@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,521 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { props } from "@stylexjs/stylex";
|
|
4
|
+
import { areaY, defineChart, dot, lineY } from "@tanstack/charts";
|
|
5
|
+
import { decorative } from "@tanstack/charts/mark/decorative";
|
|
6
|
+
import type { ChartTooltipBodyRenderContext } from "@tanstack/charts/react/tooltip";
|
|
7
|
+
import { scaleLinear } from "@tanstack/charts/scales/linear";
|
|
8
|
+
import { tooltip as tooltipFeature } from "@tanstack/charts/tooltip";
|
|
9
|
+
import { scaleUtc } from "d3-scale";
|
|
10
|
+
import type { ComponentPropsWithRef } from "react";
|
|
11
|
+
import { useId, useMemo } from "react";
|
|
12
|
+
import type { Closed } from "../../closed";
|
|
13
|
+
import { typeRoles } from "../../styles/typography.styles";
|
|
14
|
+
import { type ChartSeriesTone, chartColors } from "../chart-frame/chart-colors";
|
|
15
|
+
import { pillTickLabels, timeCrosshair } from "../chart-frame/chart-crosshair";
|
|
16
|
+
import { ChartFrame } from "../chart-frame/chart-frame";
|
|
17
|
+
import {
|
|
18
|
+
ChartLoading,
|
|
19
|
+
type ChartStatus,
|
|
20
|
+
chartRevealStyles,
|
|
21
|
+
useLoadingReveal,
|
|
22
|
+
} from "../chart-frame/chart-loading";
|
|
23
|
+
import { ChartLegend } from "../chart-legend/chart-legend";
|
|
24
|
+
import { ChartTooltip } from "../chart-tooltip/chart-tooltip";
|
|
25
|
+
import {
|
|
26
|
+
AXIS_TICK_MIN_GAP,
|
|
27
|
+
formatNumber,
|
|
28
|
+
getTickCount,
|
|
29
|
+
makeAxisFormatter,
|
|
30
|
+
makeDateFormatter,
|
|
31
|
+
preparePoints,
|
|
32
|
+
SMOOTH,
|
|
33
|
+
type TimeSeriesDatum,
|
|
34
|
+
type TimeSeriesPoint,
|
|
35
|
+
} from "./time-format";
|
|
36
|
+
import { timeSeriesStyles } from "./time-series.styles";
|
|
37
|
+
|
|
38
|
+
export type { TimeSeriesPoint } from "./time-format";
|
|
39
|
+
|
|
40
|
+
export type TimeSeriesPresentation = "chart" | "sparkline";
|
|
41
|
+
|
|
42
|
+
/** A second series, such as last year, drawn dashed in the muted tone. */
|
|
43
|
+
export interface TimeSeriesComparison {
|
|
44
|
+
label: string;
|
|
45
|
+
points: readonly TimeSeriesPoint[];
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export type TimeSeriesProps = Omit<
|
|
49
|
+
Closed<ComponentPropsWithRef<"div">>,
|
|
50
|
+
"aria-label" | "children" | "data-slot" | "role"
|
|
51
|
+
> & {
|
|
52
|
+
"aria-description"?: string;
|
|
53
|
+
"aria-label": string;
|
|
54
|
+
comparison?: TimeSeriesComparison;
|
|
55
|
+
formatAxisValue?: (value: number) => string;
|
|
56
|
+
formatValue?: (value: number) => string;
|
|
57
|
+
/** Shows the series legend below the chart. Turn it off when a card header shows it. */
|
|
58
|
+
legend?: boolean;
|
|
59
|
+
locale?: string;
|
|
60
|
+
points: readonly TimeSeriesPoint[];
|
|
61
|
+
presentation?: TimeSeriesPresentation;
|
|
62
|
+
seriesLabel: string;
|
|
63
|
+
/** "loading" holds the chart's space with a placeholder; data that replaces it wipes in. */
|
|
64
|
+
status?: ChartStatus;
|
|
65
|
+
timeZone: string;
|
|
66
|
+
tone?: ChartSeriesTone;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
interface PreparedComparison {
|
|
70
|
+
label: string;
|
|
71
|
+
points: readonly TimeSeriesDatum[];
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
interface TimeSeriesPlotProps {
|
|
75
|
+
"aria-description"?: string;
|
|
76
|
+
"aria-label": string;
|
|
77
|
+
comparison?: PreparedComparison;
|
|
78
|
+
formatAxisValue?: (value: number) => string;
|
|
79
|
+
formatValue?: (value: number) => string;
|
|
80
|
+
legend: boolean;
|
|
81
|
+
locale: string;
|
|
82
|
+
points: readonly TimeSeriesDatum[];
|
|
83
|
+
presentation: TimeSeriesPresentation;
|
|
84
|
+
reveal: boolean;
|
|
85
|
+
seriesLabel: string;
|
|
86
|
+
timeZone: string;
|
|
87
|
+
tone: ChartSeriesTone;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function assertLabels(seriesLabel: string, ariaLabel: string) {
|
|
91
|
+
if (
|
|
92
|
+
typeof seriesLabel !== "string" ||
|
|
93
|
+
typeof ariaLabel !== "string" ||
|
|
94
|
+
!seriesLabel.trim() ||
|
|
95
|
+
!ariaLabel.trim()
|
|
96
|
+
) {
|
|
97
|
+
throw new TypeError(
|
|
98
|
+
"TimeSeries requires non-empty seriesLabel and aria-label values."
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function assertOptions(
|
|
104
|
+
presentation: TimeSeriesPresentation,
|
|
105
|
+
formatValue: ((value: number) => string) | undefined,
|
|
106
|
+
formatAxisValue: ((value: number) => string) | undefined,
|
|
107
|
+
tone: ChartSeriesTone,
|
|
108
|
+
timeZone: string
|
|
109
|
+
) {
|
|
110
|
+
if (presentation !== "chart" && presentation !== "sparkline") {
|
|
111
|
+
throw new RangeError(
|
|
112
|
+
"TimeSeries presentation must be 'chart' or 'sparkline'."
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
if (
|
|
116
|
+
(formatValue !== undefined && typeof formatValue !== "function") ||
|
|
117
|
+
(formatAxisValue !== undefined && typeof formatAxisValue !== "function")
|
|
118
|
+
) {
|
|
119
|
+
throw new TypeError("TimeSeries formatters must be functions.");
|
|
120
|
+
}
|
|
121
|
+
if (!Object.hasOwn(chartColors, tone)) {
|
|
122
|
+
throw new RangeError(
|
|
123
|
+
"TimeSeries tone is not a supported chart series tone."
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
if (typeof timeZone !== "string" || !timeZone.trim()) {
|
|
127
|
+
throw new TypeError("TimeSeries requires a non-empty timeZone.");
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
interface TimeSeriesRow {
|
|
132
|
+
id: string;
|
|
133
|
+
time: number;
|
|
134
|
+
value: number | null;
|
|
135
|
+
x: Date;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Points between two gaps have no line segment, so they keep a visible dot.
|
|
139
|
+
function getIsolatedRows(rows: readonly TimeSeriesRow[]): TimeSeriesRow[] {
|
|
140
|
+
return rows.filter(
|
|
141
|
+
(row, index) =>
|
|
142
|
+
row.value !== null &&
|
|
143
|
+
(rows[index - 1]?.value ?? null) === null &&
|
|
144
|
+
(rows[index + 1]?.value ?? null) === null
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function toRows(points: readonly TimeSeriesDatum[]): TimeSeriesRow[] {
|
|
149
|
+
return points.map(({ time, x, value }) => ({
|
|
150
|
+
id: String(time),
|
|
151
|
+
time,
|
|
152
|
+
value,
|
|
153
|
+
x,
|
|
154
|
+
}));
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// The comparison is decorative: it shapes the scale but adds no focus targets.
|
|
158
|
+
function getComparisonMarks(comparison: PreparedComparison | undefined) {
|
|
159
|
+
if (!comparison) {
|
|
160
|
+
return [];
|
|
161
|
+
}
|
|
162
|
+
return [
|
|
163
|
+
decorative(
|
|
164
|
+
lineY(toRows(comparison.points), {
|
|
165
|
+
curve: SMOOTH,
|
|
166
|
+
id: "time-series-comparison",
|
|
167
|
+
key: (datum) => datum.id,
|
|
168
|
+
stroke: chartColors.muted,
|
|
169
|
+
strokeDasharray: "4 4",
|
|
170
|
+
x: "x",
|
|
171
|
+
y: "value",
|
|
172
|
+
})
|
|
173
|
+
),
|
|
174
|
+
];
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
function getLegendItems(
|
|
178
|
+
seriesLabel: string,
|
|
179
|
+
tone: ChartSeriesTone,
|
|
180
|
+
comparison: PreparedComparison | undefined
|
|
181
|
+
) {
|
|
182
|
+
const items = [{ id: "time-series", label: seriesLabel, tone }];
|
|
183
|
+
return comparison
|
|
184
|
+
? [
|
|
185
|
+
...items,
|
|
186
|
+
{
|
|
187
|
+
id: "time-series-comparison",
|
|
188
|
+
label: comparison.label,
|
|
189
|
+
tone: "muted" as const,
|
|
190
|
+
},
|
|
191
|
+
]
|
|
192
|
+
: items;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function renderTooltip(
|
|
196
|
+
context: ChartTooltipBodyRenderContext<TimeSeriesDatum, Date, number>,
|
|
197
|
+
seriesLabel: string,
|
|
198
|
+
tone: ChartSeriesTone,
|
|
199
|
+
dateFormatter: Intl.DateTimeFormat,
|
|
200
|
+
formatValue: (value: number) => string
|
|
201
|
+
) {
|
|
202
|
+
const point = context.points.find(({ datum }) => datum.value !== null);
|
|
203
|
+
if (!point) {
|
|
204
|
+
return null;
|
|
205
|
+
}
|
|
206
|
+
return (
|
|
207
|
+
<ChartTooltip
|
|
208
|
+
items={[
|
|
209
|
+
{
|
|
210
|
+
id: "time-series-value",
|
|
211
|
+
label: seriesLabel,
|
|
212
|
+
tone,
|
|
213
|
+
value: formatValue(point.yValue),
|
|
214
|
+
},
|
|
215
|
+
]}
|
|
216
|
+
label={dateFormatter.format(point.xValue)}
|
|
217
|
+
/>
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
function plotHeight(presentation: TimeSeriesPresentation) {
|
|
222
|
+
return presentation === "sparkline" ? 64 : 200;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
function TimeSeriesLegend({
|
|
226
|
+
comparison,
|
|
227
|
+
legend,
|
|
228
|
+
presentation,
|
|
229
|
+
seriesLabel,
|
|
230
|
+
tone,
|
|
231
|
+
}: Pick<
|
|
232
|
+
TimeSeriesPlotProps,
|
|
233
|
+
"comparison" | "legend" | "presentation" | "seriesLabel" | "tone"
|
|
234
|
+
>) {
|
|
235
|
+
return legend && presentation === "chart" ? (
|
|
236
|
+
<div data-slot="time-series-legend" {...props(timeSeriesStyles.legend)}>
|
|
237
|
+
<ChartLegend
|
|
238
|
+
aria-label={`${seriesLabel} series`}
|
|
239
|
+
items={getLegendItems(seriesLabel, tone, comparison)}
|
|
240
|
+
/>
|
|
241
|
+
</div>
|
|
242
|
+
) : null;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// Loading holds the plot's space and keeps the legend, so data arrives in place.
|
|
246
|
+
function TimeSeriesContent({
|
|
247
|
+
plot,
|
|
248
|
+
status,
|
|
249
|
+
}: {
|
|
250
|
+
plot: TimeSeriesPlotProps;
|
|
251
|
+
status: ChartStatus;
|
|
252
|
+
}) {
|
|
253
|
+
if (status === "loading") {
|
|
254
|
+
return (
|
|
255
|
+
<>
|
|
256
|
+
<ChartLoading
|
|
257
|
+
grid={plot.presentation === "chart"}
|
|
258
|
+
height={plotHeight(plot.presentation)}
|
|
259
|
+
/>
|
|
260
|
+
<TimeSeriesLegend {...plot} />
|
|
261
|
+
</>
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
return plot.points.some(({ value }) => value !== null) ? (
|
|
265
|
+
<TimeSeriesPlot {...plot} />
|
|
266
|
+
) : (
|
|
267
|
+
<p role="status" {...props(typeRoles.body, timeSeriesStyles.empty)}>
|
|
268
|
+
No observations available.
|
|
269
|
+
</p>
|
|
270
|
+
);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
function TimeSeriesPlot({
|
|
274
|
+
"aria-description": ariaDescription,
|
|
275
|
+
"aria-label": ariaLabel,
|
|
276
|
+
comparison,
|
|
277
|
+
legend,
|
|
278
|
+
formatAxisValue,
|
|
279
|
+
formatValue,
|
|
280
|
+
locale,
|
|
281
|
+
points,
|
|
282
|
+
presentation,
|
|
283
|
+
reveal,
|
|
284
|
+
seriesLabel,
|
|
285
|
+
timeZone,
|
|
286
|
+
tone,
|
|
287
|
+
}: TimeSeriesPlotProps) {
|
|
288
|
+
const numberFormatter = useMemo(
|
|
289
|
+
() => new Intl.NumberFormat(locale),
|
|
290
|
+
[locale]
|
|
291
|
+
);
|
|
292
|
+
// Axis ticks default to compact numbers ("13.5K"); tooltips stay exact.
|
|
293
|
+
const axisNumberFormatter = useMemo(
|
|
294
|
+
() =>
|
|
295
|
+
new Intl.NumberFormat(locale, {
|
|
296
|
+
maximumFractionDigits: 1,
|
|
297
|
+
notation: "compact",
|
|
298
|
+
}),
|
|
299
|
+
[locale]
|
|
300
|
+
);
|
|
301
|
+
const dateFormatter = useMemo(
|
|
302
|
+
() => makeDateFormatter(locale, timeZone, points),
|
|
303
|
+
[locale, points, timeZone]
|
|
304
|
+
);
|
|
305
|
+
const axisFormatter = useMemo(
|
|
306
|
+
() => makeAxisFormatter(locale, timeZone, points),
|
|
307
|
+
[locale, points, timeZone]
|
|
308
|
+
);
|
|
309
|
+
const valueFormatter = useMemo(
|
|
310
|
+
() => (value: number) => formatNumber(value, formatValue, numberFormatter),
|
|
311
|
+
[formatValue, numberFormatter]
|
|
312
|
+
);
|
|
313
|
+
// Gradient IDs must stay unique when several charts share a page.
|
|
314
|
+
const idPrefix = useId().replace(/[^\w-]/gu, "");
|
|
315
|
+
const definition = useMemo(() => {
|
|
316
|
+
const rows = toRows(points);
|
|
317
|
+
return defineChart(
|
|
318
|
+
{
|
|
319
|
+
// The area fills to zero; clipping ends it at the plot's bottom edge.
|
|
320
|
+
clip: true,
|
|
321
|
+
gradients: [
|
|
322
|
+
{
|
|
323
|
+
id: "time-series-area",
|
|
324
|
+
stops: [
|
|
325
|
+
{ color: chartColors[tone], offset: 0, opacity: 0.02 },
|
|
326
|
+
{ color: chartColors[tone], offset: 1, opacity: 0.32 },
|
|
327
|
+
],
|
|
328
|
+
},
|
|
329
|
+
],
|
|
330
|
+
guides: presentation === "sparkline" ? false : undefined,
|
|
331
|
+
marks: [
|
|
332
|
+
// Decorative marks paint without owning focus or tooltip points.
|
|
333
|
+
decorative(
|
|
334
|
+
areaY(rows, {
|
|
335
|
+
curve: SMOOTH,
|
|
336
|
+
fill: "url(#time-series-area)",
|
|
337
|
+
fillOpacity: 1,
|
|
338
|
+
id: "time-series-area",
|
|
339
|
+
key: (datum) => datum.id,
|
|
340
|
+
x: "x",
|
|
341
|
+
y: "value",
|
|
342
|
+
})
|
|
343
|
+
),
|
|
344
|
+
...getComparisonMarks(comparison),
|
|
345
|
+
...(presentation === "chart"
|
|
346
|
+
? [timeCrosshair((date) => axisFormatter.format(date))]
|
|
347
|
+
: []),
|
|
348
|
+
// Hover and focus mark the active point; resting points stay quiet.
|
|
349
|
+
lineY(rows, {
|
|
350
|
+
curve: SMOOTH,
|
|
351
|
+
id: "time-series-line",
|
|
352
|
+
key: (datum) => datum.id,
|
|
353
|
+
stroke: chartColors[tone],
|
|
354
|
+
x: "x",
|
|
355
|
+
y: "value",
|
|
356
|
+
}),
|
|
357
|
+
decorative(
|
|
358
|
+
dot(getIsolatedRows(rows), {
|
|
359
|
+
fill: chartColors[tone],
|
|
360
|
+
id: "time-series-isolated",
|
|
361
|
+
key: (datum) => datum.id,
|
|
362
|
+
r: 2.5,
|
|
363
|
+
x: "x",
|
|
364
|
+
y: "value",
|
|
365
|
+
})
|
|
366
|
+
),
|
|
367
|
+
],
|
|
368
|
+
scales: {
|
|
369
|
+
x: {
|
|
370
|
+
axis: {
|
|
371
|
+
tickLabels: {
|
|
372
|
+
...pillTickLabels,
|
|
373
|
+
thin: { minGap: AXIS_TICK_MIN_GAP },
|
|
374
|
+
},
|
|
375
|
+
ticks: {
|
|
376
|
+
count: getTickCount(points),
|
|
377
|
+
format: (date: Date) => axisFormatter.format(date),
|
|
378
|
+
},
|
|
379
|
+
},
|
|
380
|
+
// The time domain ends at the data; nicing would pad empty time.
|
|
381
|
+
nice: false,
|
|
382
|
+
scale: scaleUtc,
|
|
383
|
+
},
|
|
384
|
+
y: {
|
|
385
|
+
axis: {
|
|
386
|
+
ticks: {
|
|
387
|
+
count: 4,
|
|
388
|
+
format: (value: number) =>
|
|
389
|
+
formatNumber(
|
|
390
|
+
value,
|
|
391
|
+
formatAxisValue ?? formatValue,
|
|
392
|
+
axisNumberFormatter,
|
|
393
|
+
formatAxisValue ? "formatAxisValue" : "formatValue"
|
|
394
|
+
),
|
|
395
|
+
},
|
|
396
|
+
},
|
|
397
|
+
grid: true,
|
|
398
|
+
nice: true,
|
|
399
|
+
scale: scaleLinear,
|
|
400
|
+
},
|
|
401
|
+
},
|
|
402
|
+
},
|
|
403
|
+
{ tooltip: tooltipFeature }
|
|
404
|
+
);
|
|
405
|
+
}, [
|
|
406
|
+
axisFormatter,
|
|
407
|
+
axisNumberFormatter,
|
|
408
|
+
comparison,
|
|
409
|
+
formatAxisValue,
|
|
410
|
+
formatValue,
|
|
411
|
+
points,
|
|
412
|
+
presentation,
|
|
413
|
+
tone,
|
|
414
|
+
]);
|
|
415
|
+
const renderTooltipBody = useMemo(
|
|
416
|
+
() =>
|
|
417
|
+
(context: ChartTooltipBodyRenderContext<TimeSeriesDatum, Date, number>) =>
|
|
418
|
+
renderTooltip(
|
|
419
|
+
context,
|
|
420
|
+
seriesLabel,
|
|
421
|
+
tone,
|
|
422
|
+
dateFormatter,
|
|
423
|
+
valueFormatter
|
|
424
|
+
),
|
|
425
|
+
[dateFormatter, seriesLabel, tone, valueFormatter]
|
|
426
|
+
);
|
|
427
|
+
|
|
428
|
+
return (
|
|
429
|
+
<div data-slot="time-series-chart">
|
|
430
|
+
<div {...props(reveal && chartRevealStyles.reveal)}>
|
|
431
|
+
<ChartFrame
|
|
432
|
+
aria-description={ariaDescription}
|
|
433
|
+
aria-label={ariaLabel}
|
|
434
|
+
definition={definition}
|
|
435
|
+
height={plotHeight(presentation)}
|
|
436
|
+
idPrefix={idPrefix}
|
|
437
|
+
initialWidth={presentation === "sparkline" ? 256 : undefined}
|
|
438
|
+
renderTooltipBody={renderTooltipBody}
|
|
439
|
+
tabIndex={0}
|
|
440
|
+
/>
|
|
441
|
+
</div>
|
|
442
|
+
<TimeSeriesLegend
|
|
443
|
+
comparison={comparison}
|
|
444
|
+
legend={legend}
|
|
445
|
+
presentation={presentation}
|
|
446
|
+
seriesLabel={seriesLabel}
|
|
447
|
+
tone={tone}
|
|
448
|
+
/>
|
|
449
|
+
</div>
|
|
450
|
+
);
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
export function TimeSeries({
|
|
454
|
+
"aria-description": ariaDescription,
|
|
455
|
+
"aria-label": ariaLabel,
|
|
456
|
+
comparison,
|
|
457
|
+
legend = true,
|
|
458
|
+
formatAxisValue,
|
|
459
|
+
formatValue,
|
|
460
|
+
locale = "en-US",
|
|
461
|
+
points,
|
|
462
|
+
presentation = "chart",
|
|
463
|
+
ref: forwardedRef,
|
|
464
|
+
seriesLabel,
|
|
465
|
+
status = "ready",
|
|
466
|
+
timeZone,
|
|
467
|
+
tone = "series1",
|
|
468
|
+
...rest
|
|
469
|
+
}: TimeSeriesProps) {
|
|
470
|
+
const reveal = useLoadingReveal(status);
|
|
471
|
+
assertLabels(seriesLabel, ariaLabel);
|
|
472
|
+
assertOptions(presentation, formatValue, formatAxisValue, tone, timeZone);
|
|
473
|
+
makeDateFormatter(locale, timeZone);
|
|
474
|
+
const sortedPoints = preparePoints(points);
|
|
475
|
+
const preparedComparison = comparison && {
|
|
476
|
+
label: comparison.label,
|
|
477
|
+
points: preparePoints(comparison.points),
|
|
478
|
+
};
|
|
479
|
+
for (const name of [
|
|
480
|
+
"aria-label",
|
|
481
|
+
"children",
|
|
482
|
+
"className",
|
|
483
|
+
"data-slot",
|
|
484
|
+
"role",
|
|
485
|
+
"style",
|
|
486
|
+
]) {
|
|
487
|
+
Reflect.deleteProperty(rest, name);
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
return (
|
|
491
|
+
<div
|
|
492
|
+
{...rest}
|
|
493
|
+
aria-busy={status === "loading" || undefined}
|
|
494
|
+
data-slot="time-series"
|
|
495
|
+
ref={forwardedRef}
|
|
496
|
+
{...props(
|
|
497
|
+
timeSeriesStyles.root,
|
|
498
|
+
presentation === "sparkline" && timeSeriesStyles.sparkline
|
|
499
|
+
)}
|
|
500
|
+
>
|
|
501
|
+
<TimeSeriesContent
|
|
502
|
+
plot={{
|
|
503
|
+
"aria-description": ariaDescription,
|
|
504
|
+
"aria-label": ariaLabel,
|
|
505
|
+
comparison: preparedComparison,
|
|
506
|
+
formatAxisValue,
|
|
507
|
+
formatValue,
|
|
508
|
+
legend,
|
|
509
|
+
locale,
|
|
510
|
+
points: sortedPoints,
|
|
511
|
+
presentation,
|
|
512
|
+
reveal,
|
|
513
|
+
seriesLabel,
|
|
514
|
+
timeZone,
|
|
515
|
+
tone,
|
|
516
|
+
}}
|
|
517
|
+
status={status}
|
|
518
|
+
/>
|
|
519
|
+
</div>
|
|
520
|
+
);
|
|
521
|
+
}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { props } from "@stylexjs/stylex";
|
|
2
|
+
import type { ComponentPropsWithRef } from "react";
|
|
3
|
+
import type { Closed } from "../../closed";
|
|
4
|
+
import { typeRoles } from "../../styles/typography.styles";
|
|
5
|
+
import { visuallyHiddenStyles } from "../visually-hidden/visually-hidden.styles";
|
|
6
|
+
import { timestampStyles } from "./timestamp.styles";
|
|
7
|
+
|
|
8
|
+
export type TimestampFormat = "date" | "date-time" | "relative";
|
|
9
|
+
export type TimestampProps = Omit<
|
|
10
|
+
Closed<ComponentPropsWithRef<"time">>,
|
|
11
|
+
"children" | "data-slot" | "dateTime" | "lang" | "role"
|
|
12
|
+
> & {
|
|
13
|
+
dateTime: string;
|
|
14
|
+
format?: TimestampFormat;
|
|
15
|
+
locale?: string;
|
|
16
|
+
/**
|
|
17
|
+
* The instant `relative` counts from, as an ISO instant with a timezone.
|
|
18
|
+
* Defaults to the time of render.
|
|
19
|
+
*/
|
|
20
|
+
now?: string;
|
|
21
|
+
timeZone?: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const FORMATS = new Set<string>(["date", "date-time", "relative"]);
|
|
25
|
+
|
|
26
|
+
// Each unit is used until the next one fits; weeks stop at a month.
|
|
27
|
+
const RELATIVE_UNITS: [Intl.RelativeTimeFormatUnit, number][] = [
|
|
28
|
+
["second", 60],
|
|
29
|
+
["minute", 60],
|
|
30
|
+
["hour", 24],
|
|
31
|
+
["day", 7],
|
|
32
|
+
["week", 4.35],
|
|
33
|
+
["month", 12],
|
|
34
|
+
["year", Number.POSITIVE_INFINITY],
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
function formatRelative(date: Date, now: Date, locale: string) {
|
|
38
|
+
const formatter = new Intl.RelativeTimeFormat(locale, { numeric: "auto" });
|
|
39
|
+
let value = (date.getTime() - now.getTime()) / 1000;
|
|
40
|
+
// Under a minute reads as "now" rather than a ticking count of seconds.
|
|
41
|
+
if (Math.abs(value) < 60) {
|
|
42
|
+
return formatter.format(0, "second");
|
|
43
|
+
}
|
|
44
|
+
for (const [unit, size] of RELATIVE_UNITS) {
|
|
45
|
+
if (Math.abs(value) < size) {
|
|
46
|
+
return formatter.format(Math.round(value), unit);
|
|
47
|
+
}
|
|
48
|
+
value /= size;
|
|
49
|
+
}
|
|
50
|
+
return formatter.format(Math.round(value), "year");
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const ISO_INSTANT_REGEX =
|
|
54
|
+
/^(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})T(?<hour>\d{2}):(?<minute>\d{2}):(?<second>\d{2})(?:\.\d+)?(?<timezone>Z|[+-]\d{2}:\d{2})$/u;
|
|
55
|
+
|
|
56
|
+
function parseInstant(value: string): Date {
|
|
57
|
+
const match = ISO_INSTANT_REGEX.exec(value);
|
|
58
|
+
if (!match) {
|
|
59
|
+
throw new RangeError("Timestamp requires an ISO instant with a timezone.");
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const [, yearPart, monthPart, dayPart, hourPart, minutePart, secondPart] =
|
|
63
|
+
match;
|
|
64
|
+
const year = Number(yearPart);
|
|
65
|
+
const month = Number(monthPart);
|
|
66
|
+
const day = Number(dayPart);
|
|
67
|
+
const hour = Number(hourPart);
|
|
68
|
+
const minute = Number(minutePart);
|
|
69
|
+
const second = Number(secondPart);
|
|
70
|
+
const calendarDate = new Date(0);
|
|
71
|
+
calendarDate.setUTCFullYear(year, month - 1, day);
|
|
72
|
+
calendarDate.setUTCHours(hour, minute, second, 0);
|
|
73
|
+
if (
|
|
74
|
+
year === 0 ||
|
|
75
|
+
calendarDate.getUTCFullYear() !== year ||
|
|
76
|
+
calendarDate.getUTCMonth() !== month - 1 ||
|
|
77
|
+
calendarDate.getUTCDate() !== day ||
|
|
78
|
+
hour > 23 ||
|
|
79
|
+
minute > 59 ||
|
|
80
|
+
second > 59
|
|
81
|
+
) {
|
|
82
|
+
throw new RangeError("Timestamp requires a valid calendar date and time.");
|
|
83
|
+
}
|
|
84
|
+
const instant = new Date(Date.parse(value));
|
|
85
|
+
if (!Number.isFinite(instant.getTime())) {
|
|
86
|
+
throw new RangeError(
|
|
87
|
+
"Timestamp requires a valid ISO instant with a timezone."
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
return instant;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function formatTimestamp(
|
|
94
|
+
date: Date,
|
|
95
|
+
format: TimestampFormat,
|
|
96
|
+
locale: string,
|
|
97
|
+
timeZone: string
|
|
98
|
+
) {
|
|
99
|
+
const options: Intl.DateTimeFormatOptions =
|
|
100
|
+
format === "date"
|
|
101
|
+
? { day: "numeric", month: "short", year: "numeric" }
|
|
102
|
+
: {
|
|
103
|
+
day: "numeric",
|
|
104
|
+
hour: "numeric",
|
|
105
|
+
minute: "2-digit",
|
|
106
|
+
month: "short",
|
|
107
|
+
timeZoneName: "short",
|
|
108
|
+
year: "numeric",
|
|
109
|
+
};
|
|
110
|
+
return new Intl.DateTimeFormat(locale, { ...options, timeZone }).format(date);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function Timestamp({
|
|
114
|
+
dateTime,
|
|
115
|
+
format = "date-time",
|
|
116
|
+
locale = "en-US",
|
|
117
|
+
now,
|
|
118
|
+
ref: forwardedRef,
|
|
119
|
+
timeZone = "UTC",
|
|
120
|
+
...rest
|
|
121
|
+
}: TimestampProps) {
|
|
122
|
+
if (!FORMATS.has(format)) {
|
|
123
|
+
throw new RangeError(
|
|
124
|
+
"Timestamp format must be 'date', 'date-time', or 'relative'."
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
const date = parseInstant(dateTime);
|
|
128
|
+
const relative = format === "relative";
|
|
129
|
+
const exact = formatTimestamp(date, "date-time", locale, timeZone);
|
|
130
|
+
const label = relative
|
|
131
|
+
? formatRelative(date, now ? parseInstant(now) : new Date(), locale)
|
|
132
|
+
: formatTimestamp(date, format, locale, timeZone);
|
|
133
|
+
for (const name of [
|
|
134
|
+
"className",
|
|
135
|
+
"data-slot",
|
|
136
|
+
"dateTime",
|
|
137
|
+
"lang",
|
|
138
|
+
"role",
|
|
139
|
+
"style",
|
|
140
|
+
]) {
|
|
141
|
+
Reflect.deleteProperty(rest, name);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return (
|
|
145
|
+
<time
|
|
146
|
+
{...rest}
|
|
147
|
+
data-slot="timestamp"
|
|
148
|
+
dateTime={dateTime}
|
|
149
|
+
lang={locale}
|
|
150
|
+
ref={forwardedRef}
|
|
151
|
+
// Server and client render moments apart, so relative text may differ.
|
|
152
|
+
suppressHydrationWarning={relative}
|
|
153
|
+
title={relative ? exact : undefined}
|
|
154
|
+
{...props(timestampStyles.root, typeRoles.body)}
|
|
155
|
+
>
|
|
156
|
+
{label}
|
|
157
|
+
{relative ? (
|
|
158
|
+
<span {...props(visuallyHiddenStyles.root)}>, {exact}</span>
|
|
159
|
+
) : null}
|
|
160
|
+
</time>
|
|
161
|
+
);
|
|
162
|
+
}
|