@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 @@
|
|
|
1
|
+
import{create}from"@stylexjs/stylex";import"../../styles/colors.stylex";import{colors}from"../../styles/colors.stylex";import"../../styles/conditions.stylex";import{conditions}from"../../styles/conditions.stylex";import"../../styles/interaction.stylex";import{borderWidth,focus,focusMotion}from"../../styles/interaction.stylex";import"../../styles/shape.stylex";import{shape}from"../../styles/shape.stylex";import"../../styles/spacing.stylex";import{space}from"../../styles/spacing.stylex";import"../../styles/typography.stylex";import{fontSize,fontWeight,lineHeight}from"../../styles/typography.stylex";export const paginationStyles={active:{kWkggS:"x16d8uok x1g77xhq",kMwMTN:"xdnyjpo x12fxpw",kAXs8y:"x1tzjh5l xcd45hu",$$css:true},content:{kGNEyG:"x6s0dn4",k1xSpc:"x78zum5",kwnvtZ:"x1a02dak",kOIVth:"x13hh4mm",kjj79g:"xl56j7k",kB88ic:"xe8uvvx",kogj98:"x1ghz6dp",k7Eaqz:"xeuugli",kmVPX3:"x1717udv",$$css:true},directionLabel:{k1xSpc:"x193fxjn x1s85apg",$$css:true},disabled:{kMwMTN:"x125omll",kkrTdU:"x1h6gzvc",kSiTet:"xbyyjgo",$$css:true},ellipsis:{kGNEyG:"x6s0dn4",k1xSpc:"x3nfvp2",kjj79g:"xl56j7k",kAzted:"x19wm6jj",k7Eaqz:"x1arx1u8",kfSwDN:"x87ps6o",$$css:true},icon:{kUk6DE:"x1okw0bk",kZKoxP:"x1l36t39",k3aq6I:"x19axjrm x23xq2a x1c071of",kzqmXN:"xcdlrvm",$$css:true},iconSize:{kZKoxP:"xk8t5le",kzqmXN:"x1s4ejo4",kmVPX3:"x1717udv",$$css:true},interactive:{kWkggS:"xg17ay x10hhr2x xjbqb8w",$$css:true},item:{k7Eaqz:"xeuugli",$$css:true},labelled:{kg3NbH:"xy7odpl",$$css:true},link:{kGNEyG:"x6s0dn4",k44tkh:"x1iha7go",kKVMdj:"x1b5t0b2",kWkggS:"xjbqb8w",kaIpWk:"x1jw0md8",kB7OPa:"x9f619",kMwMTN:"x14tvo57",k1xSpc:"x3nfvp2",kGuDYH:"x1qlqyl8",kcqcaj:"xss6m8b",k63SB2:"xuku2lm",kOIVth:"xp4ho6d",kjj79g:"xl56j7k",ks0D6T:"x193iq5w",kAzted:"x19wm6jj",k7Eaqz:"xeuugli",kjBf7l:"x4dprnk x1uczgqu",kInvED:"x7jjmpn x1wfwxd8",k3XXqK:"x9v5kkp x1t137rt",kMeerF:"xm9seqh x1k57tk5",kHjlTd:"xj0a0fe",k8WAf4:"xt970qd",kg3NbH:"xb5xqfq",k9WMMc:"x2b8uid",kybGjl:"x1hl2dhg",$$css:true},root:{kMwMTN:"x125omll",kGuDYH:"x12ama9c",kLWn49:"x1rn0pvf",ks0D6T:"x193iq5w",$$css:true},srOnly:{kMcinP:"xzpqnlu",kz4h6p:"x1hyvwdk",kZKoxP:"xjm9jq1",kogj98:"xkdpibf",kVQacm:"xb3r6kr",kVAEAm:"x10l6tqk",khDVqt:"xuxw1ft",kzqmXN:"x1i1rx1s",$$css:true}};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
import type { Closed } from "../../closed";
|
|
3
|
+
export interface PartToWholePart {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
value: number;
|
|
7
|
+
}
|
|
8
|
+
export type PartToWholeProps = Omit<Closed<ComponentPropsWithRef<"div">>, "aria-label" | "children" | "data-slot" | "role"> & {
|
|
9
|
+
"aria-description"?: string;
|
|
10
|
+
"aria-label": string;
|
|
11
|
+
formatValue?: (value: number) => string;
|
|
12
|
+
locale?: string;
|
|
13
|
+
/** Up to six parts; fold the rest into "Other". */
|
|
14
|
+
parts: readonly PartToWholePart[];
|
|
15
|
+
/** Caption under the total in the donut's center. */
|
|
16
|
+
totalLabel?: string;
|
|
17
|
+
};
|
|
18
|
+
export declare function PartToWhole({ "aria-description": ariaDescription, "aria-label": ariaLabel, formatValue: formatValueProp, locale, parts: inputParts, ref: forwardedRef, totalLabel, ...rest }: PartToWholeProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";import{props}from"@stylexjs/stylex";import{defineChart}from"@tanstack/charts";import{focusGroupAngle,pie,polar,radialArc}from"@tanstack/charts/polar";import{tooltip as tooltipFeature}from"@tanstack/charts/tooltip";import{useMemo}from"react";import{typeRoles}from"../../styles/typography.styles";import{chartColors}from"../chart-frame/chart-colors";import{ChartFrame}from"../chart-frame/chart-frame";import{ChartLegend}from"../chart-legend/chart-legend";import{ChartTooltip}from"../chart-tooltip/chart-tooltip";import{partToWholeStyles}from"./part-to-whole.styles";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";function validatePart(part,ids){if(typeof part.id!=="string"||!part.id.trim()||typeof part.label!=="string"||!part.label.trim()){throw new TypeError("PartToWhole parts require non-empty ids and labels.");}if(ids.has(part.id)){throw new RangeError("PartToWhole part ids must be unique.");}if(typeof part.value!=="number"||!Number.isFinite(part.value)||part.value<0){throw new RangeError("PartToWhole values must be finite and non-negative.");}ids.add(part.id);}function prepareParts(parts){if(!Array.isArray(parts)){throw new TypeError("PartToWhole parts must be an array.");}if(parts.length>6){throw new RangeError('PartToWhole supports up to six parts; fold the rest into "Other".');}const ids=new Set();let maximum=0;for(const part of parts){validatePart(part,ids);maximum=Math.max(maximum,part.value);}const scaledTotal=maximum===0?0:parts.reduce((sum,part)=>sum+part.value/maximum,0);return parts.map((part,index)=>({...part,rawValue:part.value,share:scaledTotal===0?0:part.value/maximum/scaledTotal,tone:`series${index+1}`}));}function assertProps(ariaLabel,locale,formatValue){if(typeof ariaLabel!=="string"||!ariaLabel.trim()){throw new TypeError("PartToWhole requires a non-empty aria-label.");}if(typeof locale!=="string"||!locale.trim()){throw new TypeError("PartToWhole locale must be a non-empty string.");}if(formatValue!==undefined&&typeof formatValue!=="function"){throw new TypeError("PartToWhole formatValue must be a function.");}}function formatNumber(value,formatValue){const formatted=formatValue(value);if(typeof formatted!=="string"){throw new TypeError("PartToWhole formatValue must return a string.");}return formatted;}function renderTooltip(context,formatValue,shareFormat){const point=context.primaryPoint??context.points[0];if(!point){return null;}return/*#__PURE__*/_jsx(ChartTooltip,{items:[{id:`part-${point.datum.id}`,label:point.datum.label,tone:point.datum.tone,value:`${formatNumber(point.datum.rawValue,formatValue)} · ${shareFormat.format(point.datum.share)}`}]});}function PartToWholeChart({"aria-description":ariaDescription,"aria-label":ariaLabel,formatValue,legendItems,shareFormat,parts,totalLabel}){const definition=useMemo(()=>{const positiveParts=parts.filter(({value})=>value>0);const arcs=pie(positiveParts,{value:"share"});return defineChart({marks:[polar({inset:12,marks:[radialArc(arcs,{cornerRadius:4,fill:({tone})=>chartColors[tone],id:"part-to-whole-arcs",innerRadius:({radius})=>radius*0.74,key:({id})=>id,// A thin surface gap separates neighboring segments.
|
|
2
|
+
padAngle:()=>positiveParts.length>1?0.03:0})],scales:{angle:null,radius:null}})],scales:{x:null,y:null}},{focus:focusGroupAngle,tooltip:tooltipFeature});},[parts]);const renderTooltipBody=useMemo(()=>context=>renderTooltip(context,formatValue,shareFormat),[formatValue,shareFormat]);const total=parts.reduce((sum,{rawValue})=>sum+rawValue,0);return/*#__PURE__*/_jsxs("div",{"data-slot":"part-to-whole-chart",...props(partToWholeStyles.chart),children:[/*#__PURE__*/_jsxs("div",{...props(partToWholeStyles.plot),children:[/*#__PURE__*/_jsx(ChartFrame,{"aria-description":ariaDescription,"aria-label":ariaLabel,definition:definition,height:240,renderTooltipBody:renderTooltipBody,tabIndex:0}),/*#__PURE__*/_jsxs("div",{"aria-hidden":"true","data-slot":"part-to-whole-total",...props(partToWholeStyles.total),children:[/*#__PURE__*/_jsx("span",{...props(typeRoles.numeric),children:formatNumber(total,formatValue)}),/*#__PURE__*/_jsx("span",{...props(typeRoles.caption,partToWholeStyles.share),children:totalLabel})]})]}),/*#__PURE__*/_jsx("div",{"data-slot":"part-to-whole-legend",...props(partToWholeStyles.legend),children:/*#__PURE__*/_jsx(ChartLegend,{"aria-label":`${ariaLabel} parts`,items:legendItems})})]});}export function PartToWhole({"aria-description":ariaDescription,"aria-label":ariaLabel,formatValue:formatValueProp,locale="en-US",parts:inputParts,ref:forwardedRef,totalLabel="Total",...rest}){assertProps(ariaLabel,locale,formatValueProp);const numberFormat=useMemo(()=>new Intl.NumberFormat(locale,{maximumSignificantDigits:21}),[locale]);const formatValue=useMemo(()=>formatValueProp??numberFormat.format,[formatValueProp,numberFormat]);const parts=useMemo(()=>prepareParts(inputParts),[inputParts]);const hasPositivePart=parts.some(({value})=>value>0);const shareFormat=useMemo(()=>new Intl.NumberFormat(locale,{maximumSignificantDigits:3,style:"percent"}),[locale]);const legendItems=useMemo(()=>parts.map(({id,label,share,tone,value})=>({id:`part-${id}`,label:/*#__PURE__*/_jsxs("span",{...props(partToWholeStyles.label),children:[/*#__PURE__*/_jsx("span",{children:label})," ",/*#__PURE__*/_jsxs("span",{children:[/*#__PURE__*/_jsx("span",{...props(partToWholeStyles.value),children:formatNumber(value,formatValue)})," ",/*#__PURE__*/_jsx("span",{...props(partToWholeStyles.share),children:shareFormat.format(share)})]})]}),tone})),[formatValue,parts,shareFormat]);for(const name of["aria-label","children","className","data-slot","role","style"]){Reflect.deleteProperty(rest,name);}return/*#__PURE__*/_jsx("div",{...rest,"data-slot":"part-to-whole",ref:forwardedRef,...props(partToWholeStyles.root),children:parts.length===0||!hasPositivePart?/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx("p",{"aria-label":ariaLabel,role:"status",...props(typeRoles.body,partToWholeStyles.empty),children:parts.length===0?"No parts available.":"All parts have a value of zero."}),parts.length>0?/*#__PURE__*/_jsx(ChartLegend,{"aria-label":`${ariaLabel} parts`,items:legendItems}):null]}):/*#__PURE__*/_jsx(PartToWholeChart,{"aria-description":ariaDescription,"aria-label":ariaLabel,formatValue:formatValue,legendItems:legendItems,parts:parts,shareFormat:shareFormat,totalLabel:totalLabel})});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{create}from"@stylexjs/stylex";import"../../styles/colors.stylex";import{colors}from"../../styles/colors.stylex";import"../../styles/spacing.stylex";import{space}from"../../styles/spacing.stylex";import"../../styles/typography.stylex";import{fontWeight}from"../../styles/typography.stylex";export const partToWholeStyles={chart:{kGNEyG:"x6s0dn4",k1xSpc:"xrvj5dj",kOIVth:"x1q60jeg",kumcoG:"xgqc1xh x1mkdm3x",$$css:true},empty:{kqGvvJ:"x10im51j",$$css:true},label:{kL6WhQ:"x9rbyu3",kfdmCh:"x1q0q8m5",kt9PQ7:"xso031l",k1xSpc:"xrvj5dj",kOIVth:"xiw8qbs",kumcoG:"xju1xpo",kzqmXN:"xh8yej3",k7Eaqz:"xeuugli",kHjlTd:"xj0a0fe",k8WAf4:"x391bbb",k9WMMc:"x1yc453h",$$css:true},legend:{k7Eaqz:"xeuugli",$$css:true},plot:{k7Eaqz:"xeuugli",kVAEAm:"x1n2onr6",$$css:true},root:{k9g6sI:"x12h1iku",k7Eaqz:"xeuugli",$$css:true},share:{kMwMTN:"x125omll",k1xSpc:"x1rg5ohu",kcqcaj:"xss6m8b",k7Eaqz:"xj9j1fp",k9WMMc:"xp4054r",$$css:true},total:{kGNEyG:"x6s0dn4",kMwMTN:"x14tvo57",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kpwlN0:"x10a8y8t",kjj79g:"xl56j7k",kfzvcC:"x47corl",kVAEAm:"x10l6tqk",$$css:true},value:{kMwMTN:"x14tvo57",kcqcaj:"xss6m8b",k63SB2:"xuku2lm",$$css:true}};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Popover as BasePopover, type PopoverCloseProps as BasePopoverCloseProps, type PopoverDescriptionProps as BasePopoverDescriptionProps, type PopoverPopupProps as BasePopoverPopupProps, type PopoverPortalProps as BasePopoverPortalProps, type PopoverPositionerProps as BasePopoverPositionerProps, type PopoverRootProps as BasePopoverRootProps, type PopoverTitleProps as BasePopoverTitleProps, type PopoverTriggerProps as BasePopoverTriggerProps } from "@base-ui/react/popover";
|
|
2
|
+
import type { ComponentPropsWithRef } from "react";
|
|
3
|
+
import type { Closed } from "../../closed";
|
|
4
|
+
type PopoverTriggerRef = ComponentPropsWithRef<typeof BasePopover.Trigger>["ref"];
|
|
5
|
+
type PopoverPopupRef = ComponentPropsWithRef<typeof BasePopover.Popup>["ref"];
|
|
6
|
+
export type PopoverProps<Payload = unknown> = Closed<BasePopoverRootProps<Payload>>;
|
|
7
|
+
export type PopoverTriggerProps<Payload = unknown> = Closed<Omit<BasePopoverTriggerProps<Payload>, "ref"> & {
|
|
8
|
+
ref?: PopoverTriggerRef;
|
|
9
|
+
}>;
|
|
10
|
+
export type PopoverPopupVariant = "default" | "bare";
|
|
11
|
+
export type PopoverPopupProps = Closed<Omit<BasePopoverPopupProps, "ref"> & {
|
|
12
|
+
align?: BasePopoverPositionerProps["align"];
|
|
13
|
+
alignOffset?: BasePopoverPositionerProps["alignOffset"];
|
|
14
|
+
anchor?: BasePopoverPositionerProps["anchor"];
|
|
15
|
+
portalProps?: Closed<BasePopoverPortalProps>;
|
|
16
|
+
ref?: PopoverPopupRef;
|
|
17
|
+
side?: BasePopoverPositionerProps["side"];
|
|
18
|
+
sideOffset?: BasePopoverPositionerProps["sideOffset"];
|
|
19
|
+
tooltipStyle?: boolean;
|
|
20
|
+
variant?: PopoverPopupVariant;
|
|
21
|
+
}>;
|
|
22
|
+
export type PopoverTitleProps = Closed<BasePopoverTitleProps>;
|
|
23
|
+
export type PopoverDescriptionProps = Closed<BasePopoverDescriptionProps>;
|
|
24
|
+
export type PopoverCloseProps = Closed<BasePopoverCloseProps>;
|
|
25
|
+
export declare const PopoverCreateHandle: typeof BasePopover.createHandle;
|
|
26
|
+
export declare const Popover: typeof BasePopover.Root;
|
|
27
|
+
export declare const PopoverPrimitive: typeof BasePopover;
|
|
28
|
+
export declare function PopoverTrigger<Payload = unknown>({ ref: forwardedRef, render, type, ...rest }: PopoverTriggerProps<Payload>): import("react").JSX.Element;
|
|
29
|
+
export declare function PopoverPopup({ align, alignOffset, anchor, children, render, portalProps, ref: forwardedRef, side, sideOffset, tooltipStyle, variant, ...rest }: PopoverPopupProps): import("react").JSX.Element;
|
|
30
|
+
export declare function PopoverTitle({ children, render, ref: forwardedRef, ...rest }: PopoverTitleProps): import("react").JSX.Element;
|
|
31
|
+
export declare function PopoverDescription({ children, render, ref: forwardedRef, ...rest }: PopoverDescriptionProps): import("react").JSX.Element;
|
|
32
|
+
export declare function PopoverClose({ ref: forwardedRef, render, type, ...rest }: PopoverCloseProps): import("react").JSX.Element;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{Popover as BasePopover}from"@base-ui/react/popover";import{props}from"@stylexjs/stylex";import{protectRenderSlot}from"../../render-utils";import{popoverStyles}from"./popover.styles";import{jsx as _jsx}from"react/jsx-runtime";export const PopoverCreateHandle=BasePopover.createHandle;export const Popover=BasePopover.Root;export const PopoverPrimitive=BasePopover;export function PopoverTrigger({ref:forwardedRef=undefined,render,type,...rest}){return/*#__PURE__*/_jsx(BasePopover.Trigger,{...rest,"data-slot":"popover-trigger",ref:forwardedRef,render:protectRenderSlot("popover-trigger",render),type:render?type:type??"button"});}function getPopoverStyles(variant,tooltipStyle){const bare=variant==="bare";return{popup:props(popoverStyles.popup,tooltipStyle&&popoverStyles.popupTooltip,bare&&popoverStyles.popupBare),positioner:props(popoverStyles.positioner,bare&&popoverStyles.positionerBare),viewport:props(popoverStyles.viewport,popoverStyles.viewportContent,tooltipStyle&&popoverStyles.viewportTooltip,tooltipStyle&&popoverStyles.viewportContentTooltip,bare&&popoverStyles.viewportBare,bare&&popoverStyles.viewportContentBare)};}export function PopoverPopup({align="center",alignOffset=0,anchor,children,render,portalProps,ref:forwardedRef=undefined,side="bottom",sideOffset=4,tooltipStyle=false,variant="default",...rest}){const styles=getPopoverStyles(variant,tooltipStyle);const Viewport=portalProps?.keepMounted?"div":BasePopover.Viewport;return/*#__PURE__*/_jsx(BasePopover.Portal,{...portalProps,children:/*#__PURE__*/_jsx(BasePopover.Positioner,{align:align,alignOffset:alignOffset,anchor:anchor,"data-slot":"popover-positioner",side:side,sideOffset:sideOffset,...styles.positioner,children:/*#__PURE__*/_jsx(BasePopover.Popup,{...rest,"data-slot":"popover-popup",ref:forwardedRef,render:protectRenderSlot("popover-popup",render),...styles.popup,children:/*#__PURE__*/_jsx(Viewport,{"data-slot":"popover-viewport",...styles.viewport,children:children})})})});}export function PopoverTitle({children,render,ref:forwardedRef,...rest}){return/*#__PURE__*/_jsx(BasePopover.Title,{...rest,"data-slot":"popover-title",ref:forwardedRef,render:protectRenderSlot("popover-title",render),...props(popoverStyles.title),children:children});}export function PopoverDescription({children,render,ref:forwardedRef,...rest}){return/*#__PURE__*/_jsx(BasePopover.Description,{...rest,"data-slot":"popover-description",ref:forwardedRef,render:protectRenderSlot("popover-description",render),...props(popoverStyles.description),children:children});}export function PopoverClose({ref:forwardedRef,render,type,...rest}){return/*#__PURE__*/_jsx(BasePopover.Close,{...rest,"data-slot":"popover-close",ref:forwardedRef,render:protectRenderSlot("popover-close",render),type:render?type:type??"button"});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{create}from"@stylexjs/stylex";import"../../styles/colors.stylex";import{colors}from"../../styles/colors.stylex";import"../../styles/conditions.stylex";import{conditions}from"../../styles/conditions.stylex";import"../../styles/interaction.stylex";import{borderWidth}from"../../styles/interaction.stylex";import"../../styles/motion.stylex";import{duration,easing}from"../../styles/motion.stylex";import"../../styles/shadows.stylex";import{shadows}from"../../styles/shadows.stylex";import"../../styles/shape.stylex";import{shape}from"../../styles/shape.stylex";import"../../styles/spacing.stylex";import{space}from"../../styles/spacing.stylex";import"../../styles/typography.stylex";import{fontSize,fontWeight,letterSpacing,lineHeight}from"../../styles/typography.stylex";export const popoverStyles={description:{kMwMTN:"x125omll",kGuDYH:"xlh8hku",k63SB2:"x1lo1l87",kLWn49:"x2xzzt7",k1K539:"xat24cr",keoZOQ:"x1i4bqd6 xdj266r",kHjlTd:"xj0a0fe",$$css:true},popup:{kWkggS:"xui3q9s",kVAM5u:"x1l55r2k x155xxfk",kaIpWk:"x1yl01a3",ksu8eU:"x1y0btm7",kMzoRj:"x1cdonsl",kGVxlE:"x1mhlhek",kB7OPa:"x9f619",kMwMTN:"x14tvo57",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kZKoxP:"x13f4qkn",ks0D6T:"xtuccea",kSiTet:"xiyypsa x1hw7zpd x1hc1fzr",kI3sdo:"x1a2a7pz",kVAEAm:"x1n2onr6",k3aq6I:"xddaku3 xkr3uco x5q7jw0 x1w69v5t xub4z9z x1hl4pyw xeoiet0 xb8fv44 x19hlpk1 xbp8eot x1h69cw3 x109428r x1c071of",k3nNDw:"xctpfpq",kIyJzY:"x1e471i8 x107nfut xmhz0v7 x18kz1lc",k1ekBW:"x1shgudx",kAMwcw:"xvhdtae",kzqmXN:"x1qd2gme",$$css:true},popupBare:{kWkggS:"xjbqb8w",kVAM5u:"x9r1u3d",ksu8eU:"xng3xce",kMzoRj:"xc342km",kGVxlE:"x1gnnqk1",kOIVth:"xjbgufp",kmVPX3:"xkif0i3",$$css:true},popupTooltip:{kaIpWk:"x2b34ud",kGuDYH:"x1ws78te",kzqmXN:"x1dk3ku4",$$css:true},positioner:{kZKoxP:"xm56wjt",ks0D6T:"xtuccea",kIyJzY:"x1e471i8 xmhz0v7 x18kz1lc",k1ekBW:"x1f0ettp",kAMwcw:"xvhdtae",kzqmXN:"xluuen9",kY2c9j:"xa9119d",$$css:true},positionerBare:{kzqmXN:"x14atkfc",$$css:true},title:{kMwMTN:"x14tvo57",kGuDYH:"x12ama9c",k63SB2:"xlw70nr",kb6lSQ:"x15nokgc",kLWn49:"x1rn0pvf",kqGvvJ:"x10im51j",kHjlTd:"xj0a0fe",$$css:true},viewport:{kB7OPa:"x9f619",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x1q60jeg",kZKoxP:"x5yr21d",kskxy:"x1374xjt",kXHlph:"x101abm8",kORKVm:"x199s720 x1odjw0f",kZeWKH:"xish69e",kmVPX3:"xvgr8tm",kVAEAm:"x1n2onr6",kzqmXN:"xh8yej3",$$css:true},viewportBare:{kOIVth:"xxhr3t",kmVPX3:"x1717udv",$$css:true},viewportContent:{k1xSpc:"x46yjh3",kXwgrk:"x7z70wc",kOIVth:"x7su1mm",kSiTet:"x1kcga6d xcyctcy",kIyJzY:"x14l6qqt x28c8be",k1ekBW:"x1blx4e1",$$css:true},viewportContentBare:{kOIVth:"xtmijwj",$$css:true},viewportContentTooltip:{kOIVth:"x1bbk1g",$$css:true},viewportTooltip:{kOIVth:"x13hh4mm",k8WAf4:"x1lmimt7",kg3NbH:"xy7odpl",$$css:true}};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PreviewCard as BasePreviewCard, type PreviewCardPopupProps as BasePreviewCardPopupProps, type PreviewCardPortalProps as BasePreviewCardPortalProps, type PreviewCardPositionerProps as BasePreviewCardPositionerProps, type PreviewCardRootProps as BasePreviewCardRootProps, type PreviewCardTriggerProps as BasePreviewCardTriggerProps } from "@base-ui/react/preview-card";
|
|
2
|
+
import type { ComponentPropsWithRef } from "react";
|
|
3
|
+
import type { Closed } from "../../closed";
|
|
4
|
+
type PreviewCardTriggerRef = ComponentPropsWithRef<typeof BasePreviewCard.Trigger>["ref"];
|
|
5
|
+
type PreviewCardPopupRef = ComponentPropsWithRef<typeof BasePreviewCard.Popup>["ref"];
|
|
6
|
+
export type PreviewCardProps<Payload = unknown> = Closed<BasePreviewCardRootProps<Payload>>;
|
|
7
|
+
export type PreviewCardTriggerProps<Payload = unknown> = Closed<Omit<BasePreviewCardTriggerProps<Payload>, "ref"> & {
|
|
8
|
+
ref?: PreviewCardTriggerRef;
|
|
9
|
+
}>;
|
|
10
|
+
export type PreviewCardPopupProps = Closed<Omit<BasePreviewCardPopupProps, "ref"> & {
|
|
11
|
+
align?: BasePreviewCardPositionerProps["align"];
|
|
12
|
+
anchor?: BasePreviewCardPositionerProps["anchor"];
|
|
13
|
+
portalProps?: Closed<BasePreviewCardPortalProps>;
|
|
14
|
+
ref?: PreviewCardPopupRef;
|
|
15
|
+
sideOffset?: BasePreviewCardPositionerProps["sideOffset"];
|
|
16
|
+
}>;
|
|
17
|
+
export declare const PreviewCard: <Payload>(props: BasePreviewCard.Root.Props<Payload>) => React.JSX.Element;
|
|
18
|
+
export declare function PreviewCardTrigger<Payload = unknown>({ ref: forwardedRef, render, ...rest }: PreviewCardTriggerProps<Payload>): import("react").JSX.Element;
|
|
19
|
+
export declare function PreviewCardPopup({ align, anchor, children, render, portalProps, ref: forwardedRef, sideOffset, ...rest }: PreviewCardPopupProps): import("react").JSX.Element;
|
|
20
|
+
export declare const PreviewCardPrimitive: typeof BasePreviewCard;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{PreviewCard as BasePreviewCard}from"@base-ui/react/preview-card";import{props}from"@stylexjs/stylex";import{protectRenderSlot}from"../../render-utils";import{previewCardStyles}from"./preview-card.styles";import{jsx as _jsx}from"react/jsx-runtime";export const PreviewCard=BasePreviewCard.Root;export function PreviewCardTrigger({ref:forwardedRef=undefined,render,...rest}){return/*#__PURE__*/_jsx(BasePreviewCard.Trigger,{...rest,"data-slot":"preview-card-trigger",ref:forwardedRef,render:protectRenderSlot("preview-card-trigger",render)});}export function PreviewCardPopup({align="center",anchor,children,render,portalProps,ref:forwardedRef=undefined,sideOffset=4,...rest}){return/*#__PURE__*/_jsx(BasePreviewCard.Portal,{...portalProps,children:/*#__PURE__*/_jsx(BasePreviewCard.Positioner,{align:align,anchor:anchor,"data-slot":"preview-card-positioner",sideOffset:sideOffset,...props(previewCardStyles.positioner),children:/*#__PURE__*/_jsx(BasePreviewCard.Popup,{...rest,"data-slot":"preview-card-content",ref:forwardedRef,render:protectRenderSlot("preview-card-content",render),...props(previewCardStyles.popup),children:children})})});}export const PreviewCardPrimitive=BasePreviewCard;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{create}from"@stylexjs/stylex";import"../../styles/colors.stylex";import{colors}from"../../styles/colors.stylex";import"../../styles/conditions.stylex";import{conditions}from"../../styles/conditions.stylex";import"../../styles/motion.stylex";import{duration,easing}from"../../styles/motion.stylex";import"../../styles/shadows.stylex";import{shadows}from"../../styles/shadows.stylex";import"../../styles/shape.stylex";import{shape}from"../../styles/shape.stylex";import"../../styles/spacing.stylex";import{space}from"../../styles/spacing.stylex";import"../../styles/typography.stylex";import{fontSize,lineHeight}from"../../styles/typography.stylex";export const previewCardStyles={popup:{kWkggS:"xui3q9s",kVAM5u:"x1l55r2k x155xxfk",kT0f0o:"x3dbire",kVL7Gh:"xqo3ow1",kfmiAY:"x1arab8j",krdFHd:"x1ig4fz6",ksu8eU:"x1y0btm7",kMzoRj:"xmkeg23",kGVxlE:"x1mhlhek",kB7OPa:"x9f619",kMwMTN:"x14tvo57",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kGuDYH:"xlh8hku",kLWn49:"x2xzzt7",kskxy:"x1374xjt",ks0D6T:"xtuccea",kSiTet:"xiyypsa x1hw7zpd x1hc1fzr",kI3sdo:"x1a2a7pz",kHjlTd:"xj0a0fe",kORKVm:"x1odjw0f",kZeWKH:"xish69e",kmVPX3:"xzijf4x",k3aq6I:"x2bnnpm x1n9vljb x1c071of",k3nNDw:"xctpfpq",kIyJzY:"x107nfut x18kz1lc x1e471i8 xmhz0v7",k1ekBW:"x6o7n8i",kAMwcw:"xvhdtae",kzqmXN:"x1fjzz8u",$$css:true},positioner:{kY2c9j:"xa9119d",$$css:true}};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Progress as BaseProgress } from "@base-ui/react/progress";
|
|
2
|
+
import type { ComponentPropsWithRef } from "react";
|
|
3
|
+
type BaseProgressRootProps = ComponentPropsWithRef<typeof BaseProgress.Root>;
|
|
4
|
+
type BaseProgressTrackProps = ComponentPropsWithRef<typeof BaseProgress.Track>;
|
|
5
|
+
type BaseProgressIndicatorProps = ComponentPropsWithRef<typeof BaseProgress.Indicator>;
|
|
6
|
+
type BaseProgressLabelProps = ComponentPropsWithRef<typeof BaseProgress.Label>;
|
|
7
|
+
type BaseProgressValueProps = ComponentPropsWithRef<typeof BaseProgress.Value>;
|
|
8
|
+
export type ProgressProps = Omit<BaseProgressRootProps, "className" | "data-slot" | "style"> & {
|
|
9
|
+
ref?: BaseProgressRootProps["ref"];
|
|
10
|
+
};
|
|
11
|
+
export type ProgressTrackProps = Omit<BaseProgressTrackProps, "className" | "data-slot" | "style"> & {
|
|
12
|
+
ref?: BaseProgressTrackProps["ref"];
|
|
13
|
+
};
|
|
14
|
+
export type ProgressIndicatorProps = Omit<BaseProgressIndicatorProps, "className" | "data-slot" | "style"> & {
|
|
15
|
+
ref?: BaseProgressIndicatorProps["ref"];
|
|
16
|
+
};
|
|
17
|
+
export type ProgressLabelProps = Omit<BaseProgressLabelProps, "className" | "data-slot" | "style"> & {
|
|
18
|
+
ref?: BaseProgressLabelProps["ref"];
|
|
19
|
+
};
|
|
20
|
+
export type ProgressValueProps = Omit<BaseProgressValueProps, "className" | "data-slot" | "style"> & {
|
|
21
|
+
ref?: BaseProgressValueProps["ref"];
|
|
22
|
+
};
|
|
23
|
+
export declare function Progress({ children, locale, ref: forwardedRef, render, ...rest }: ProgressProps): import("react").JSX.Element;
|
|
24
|
+
export declare function ProgressTrack({ children, ref: forwardedRef, render, ...rest }: ProgressTrackProps): import("react").JSX.Element;
|
|
25
|
+
export declare function ProgressIndicator({ children, ref: forwardedRef, render, ...rest }: ProgressIndicatorProps): import("react").JSX.Element;
|
|
26
|
+
export declare function ProgressLabel({ children, ref: forwardedRef, render, ...rest }: ProgressLabelProps): import("react").JSX.Element;
|
|
27
|
+
export declare function ProgressValue({ children, ref: forwardedRef, render, ...rest }: ProgressValueProps): import("react").JSX.Element;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{Progress as BaseProgress}from"@base-ui/react/progress";import{props}from"@stylexjs/stylex";import{protectRenderSlot}from"../../render-utils";import{progressStyles}from"./progress.styles";import{jsx as _jsx}from"react/jsx-runtime";export function Progress({children,locale="en",ref:forwardedRef,render,...rest}){return/*#__PURE__*/_jsx(BaseProgress.Root,{locale:locale,...rest,"data-slot":"progress",ref:forwardedRef,render:protectRenderSlot("progress",render),...props(progressStyles.root),children:children?children:/*#__PURE__*/_jsx(ProgressTrack,{children:/*#__PURE__*/_jsx(ProgressIndicator,{})})});}export function ProgressTrack({children,ref:forwardedRef,render,...rest}){return/*#__PURE__*/_jsx(BaseProgress.Track,{...rest,"data-slot":"progress-track",ref:forwardedRef,render:protectRenderSlot("progress-track",render),...props(progressStyles.track),children:children});}export function ProgressIndicator({children,ref:forwardedRef,render,...rest}){return/*#__PURE__*/_jsx(BaseProgress.Indicator,{...rest,"data-slot":"progress-indicator",ref:forwardedRef,render:protectRenderSlot("progress-indicator",render),...props(progressStyles.indicator),children:children});}export function ProgressLabel({children,ref:forwardedRef,render,...rest}){return/*#__PURE__*/_jsx(BaseProgress.Label,{...rest,"data-slot":"progress-label",ref:forwardedRef,render:protectRenderSlot("progress-label",render),...props(progressStyles.label),children:children});}export function ProgressValue({children,ref:forwardedRef,render,...rest}){return/*#__PURE__*/_jsx(BaseProgress.Value,{...rest,"data-slot":"progress-value",ref:forwardedRef,render:protectRenderSlot("progress-value",render),...props(progressStyles.value),children:children});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{create,keyframes}from"@stylexjs/stylex";import"../../styles/colors.stylex";import{colors}from"../../styles/colors.stylex";import"../../styles/conditions.stylex";import{conditions}from"../../styles/conditions.stylex";import"../../styles/motion.stylex";import{duration,easing}from"../../styles/motion.stylex";import"../../styles/spacing.stylex";import{space}from"../../styles/spacing.stylex";import"../../styles/typography.stylex";import{fontSize,fontWeight,lineHeight}from"../../styles/typography.stylex";const indeterminateProgress="xr3m334-B";export const progressStyles={indicator:{k44tkh:"xui4633 xmg6eyc",ko0y90:"xa4qsjk",kKVMdj:"xmhgdi3 xhkntpa x1a5igra",kyAemX:"x16mm3sk",kWkggS:"x11ovu81",kaIpWk:"x10hpsqq",kB7OPa:"x9f619",k1xSpc:"x1lliihq",kZKoxP:"x3igimt",kIyJzY:"x1e471i8 x115jf8",k1ekBW:"xxrbq2n",kAMwcw:"xvhdtae",kzqmXN:"xhwox xwjmw90",$$css:true},label:{kMwMTN:"x14tvo57",kGuDYH:"xlh8hku",k63SB2:"xuku2lm",kLWn49:"x2xzzt7",$$css:true},root:{kB7OPa:"x9f619",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x13hh4mm",kzqmXN:"xh8yej3",$$css:true},track:{kWkggS:"xcmsz27",kaIpWk:"x10hpsqq",kB7OPa:"x9f619",k1xSpc:"x1lliihq",kZKoxP:"x4j2xbe",kVQacm:"xb3r6kr",kzqmXN:"xh8yej3",$$css:true},value:{kMwMTN:"x14tvo57",kGuDYH:"xlh8hku",kcqcaj:"xss6m8b",k63SB2:"x1lo1l87",kLWn49:"x2xzzt7",$$css:true}};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
import type { Closed } from "../../closed";
|
|
3
|
+
import { type ChartSeriesTone } from "../chart-frame/chart-colors";
|
|
4
|
+
export interface ProgressRing {
|
|
5
|
+
/** Shown instead of the formatted value, such as "1h 45m". */
|
|
6
|
+
display?: string;
|
|
7
|
+
goal: number;
|
|
8
|
+
id: string;
|
|
9
|
+
label: string;
|
|
10
|
+
/** Defaults to the ring's position in the palette order. */
|
|
11
|
+
tone?: ChartSeriesTone;
|
|
12
|
+
value: number;
|
|
13
|
+
}
|
|
14
|
+
export type ProgressRingsSize = "md" | "sm";
|
|
15
|
+
export type ProgressRingsProps = Omit<Closed<ComponentPropsWithRef<"figure">>, "aria-label" | "children" | "data-slot" | "role"> & {
|
|
16
|
+
"aria-label": string;
|
|
17
|
+
formatValue?: (value: number) => string;
|
|
18
|
+
locale?: string;
|
|
19
|
+
/** Up to three rings, outermost first. */
|
|
20
|
+
rings: readonly ProgressRing[];
|
|
21
|
+
/** sm is a 32px glyph for dense grids such as a calendar; it shows no tiles. */
|
|
22
|
+
size?: ProgressRingsSize;
|
|
23
|
+
};
|
|
24
|
+
/** Up to three concentric rings, each showing progress toward its own goal. */
|
|
25
|
+
export declare function ProgressRings({ "aria-label": ariaLabel, formatValue, locale, ref: forwardedRef, rings: inputRings, size, ...rest }: ProgressRingsProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";import{props}from"@stylexjs/stylex";import{typeRoles}from"../../styles/typography.styles";import{assertAriaLabel,assertIdentity,assertNonNegative,assertTone}from"../chart-frame/chart-assert";import{chartColors}from"../chart-frame/chart-colors";import{ChartHoverTooltip,useChartHover}from"../chart-frame/chart-hover";import{RingGraphic}from"../chart-frame/ring-graphic";import{visuallyHiddenStyles}from"../visually-hidden/visually-hidden.styles";import{progressRingsStyles as styles}from"./progress-rings.styles";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const NAME="ProgressRings";const TONES=["series1","series2","series3"];const GEOMETRY={md:{diameter:176,gap:4,stroke:16},sm:{diameter:32,gap:1,stroke:3}};function assertRings(rings){if(!Array.isArray(rings)||rings.length===0||rings.length>3){throw new RangeError("ProgressRings needs one to three rings.");}const ids=new Set();for(const ring of rings){assertIdentity(NAME,ring,ids);assertNonNegative(NAME,ring.value);if(!(Number.isFinite(ring.goal)&&ring.goal>0)){throw new RangeError("ProgressRings goals must be positive.");}assertTone(NAME,ring.tone);}}/** Up to three concentric rings, each showing progress toward its own goal. */export function ProgressRings({"aria-label":ariaLabel,formatValue,locale="en-US",ref:forwardedRef,rings:inputRings,size="md",...rest}){assertAriaLabel(NAME,ariaLabel);assertRings(inputRings);for(const name of["children","className","data-slot","role","style"]){Reflect.deleteProperty(rest,name);}const format=formatValue??new Intl.NumberFormat(locale).format;const percent=new Intl.NumberFormat(locale,{style:"percent"});const rings=inputRings.map((ring,index)=>({...ring,tone:ring.tone??TONES[index]}));const compact=size==="sm";const hover=useChartHover();const{fade,hostRef,hostStyle,linkProps,markProps}=hover;// Hovering a ring shows its value and progress; hovering a tile lights its ring.
|
|
2
|
+
const tips=new Map(rings.map(({display,goal,id,label,tone,value})=>[id,{items:[{id,label,tone,value:`${display??format(value)} · ${percent.format(value/goal)}`}]}]));const ringHover={fade,markProps:id=>markProps(id,tips.get(id))};return/*#__PURE__*/_jsxs("figure",{...rest,"aria-label":ariaLabel,"data-slot":"progress-rings",ref:forwardedRef,...props(styles.root,compact&&styles.compact,typeRoles.ui),children:[/*#__PURE__*/_jsx("ul",{...props(styles.list,compact?visuallyHiddenStyles.root:styles.tiles),children:rings.map(({display,goal,id,label,tone,value})=>/*#__PURE__*/_jsxs("li",{"data-slot":"progress-rings-item",...linkProps(id),...props(styles.tile,...fade(id)),children:[/*#__PURE__*/_jsxs("span",{...props(styles.label),children:[/*#__PURE__*/_jsx("span",{"aria-hidden":"true",...props(styles.swatch(chartColors[tone]))}),label]}),/*#__PURE__*/_jsxs("span",{children:[/*#__PURE__*/_jsx("span",{...props(styles.value),children:display??format(value)}),/*#__PURE__*/_jsx("span",{...props(styles.share,typeRoles.caption),children:percent.format(value/goal)})]})]},id))}),/*#__PURE__*/_jsxs("div",{ref:hostRef,...props(hostStyle),children:[/*#__PURE__*/_jsx(RingGraphic,{...GEOMETRY[size],hover:ringHover,rings:rings.map(({goal,id,tone,value})=>({fraction:value/goal,id,tone}))}),/*#__PURE__*/_jsx(ChartHoverTooltip,{hover:hover.hover})]})]});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{create}from"@stylexjs/stylex";import"../../styles/colors.stylex";import{colors}from"../../styles/colors.stylex";import"../../styles/shape.stylex";import{shape}from"../../styles/shape.stylex";import"../../styles/spacing.stylex";import{space}from"../../styles/spacing.stylex";import"../../styles/typography.stylex";import{fontWeight}from"../../styles/typography.stylex";const _temp={kZKoxP:"x1qa65zt",kaIpWk:"x18zih8k",kmuXW:"x2lah0s",kzqmXN:"x1e7hgle","$$css":true};export const progressRingsStyles={compact:{k1xSpc:"x3nfvp2",$$css:true},label:{kGNEyG:"x6s0dn4",kMwMTN:"x125omll",k1xSpc:"x78zum5",kOIVth:"xp4ho6d",k7Eaqz:"xeuugli",$$css:true},list:{k1xSpc:"xrvj5dj",kOIVth:"xp4ho6d",kumcoG:"x1cmj9de",kB88ic:"xe8uvvx",kogj98:"x1ghz6dp",kmVPX3:"x1717udv",$$css:true},root:{kGNEyG:"x6s0dn4",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x1q60jeg",kogj98:"x1ghz6dp",k7Eaqz:"xeuugli",$$css:true},share:{kMwMTN:"x125omll",kcqcaj:"xss6m8b",keTefX:"xi4je3c",$$css:true},swatch:backgroundColor=>[_temp,{kWkggS:backgroundColor!=null?"xl8spv7":backgroundColor,$$css:true},{"--x-backgroundColor":backgroundColor!=null?backgroundColor:undefined}],tile:{kSGwAc:"xkh2ocl",kWkggS:"xwn18cz",kaIpWk:"x2b34ud",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x13hh4mm",k7Eaqz:"xeuugli",k8WAf4:"x391bbb",kg3NbH:"xy7odpl",$$css:true},tiles:{kSGwAc:"xkh2ocl",$$css:true},value:{kMwMTN:"x14tvo57",kcqcaj:"xss6m8b",k63SB2:"xuku2lm",$$css:true}};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
export type PropertyListProps = Omit<ComponentPropsWithRef<"dl">, "className" | "data-slot" | "style">;
|
|
3
|
+
export type PropertyListItemProps = Omit<ComponentPropsWithRef<"div">, "className" | "data-slot" | "style">;
|
|
4
|
+
export type PropertyListLabelProps = Omit<ComponentPropsWithRef<"dt">, "className" | "data-slot" | "style">;
|
|
5
|
+
export type PropertyListValueProps = Omit<ComponentPropsWithRef<"dd">, "className" | "data-slot" | "style">;
|
|
6
|
+
export declare function PropertyList({ children, ref: forwardedRef, ...rest }: PropertyListProps): import("react").JSX.Element;
|
|
7
|
+
export declare function PropertyListItem({ children, ref: forwardedRef, ...rest }: PropertyListItemProps): import("react").JSX.Element;
|
|
8
|
+
export declare function PropertyListLabel({ children, ref: forwardedRef, ...rest }: PropertyListLabelProps): import("react").JSX.Element;
|
|
9
|
+
export declare function PropertyListValue({ children, ref: forwardedRef, ...rest }: PropertyListValueProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{props}from"@stylexjs/stylex";import{propertyListStyles}from"./property-list.styles";import{jsx as _jsx}from"react/jsx-runtime";export function PropertyList({children,ref:forwardedRef,...rest}){return/*#__PURE__*/_jsx("dl",{...rest,"data-slot":"property-list",ref:forwardedRef,...props(propertyListStyles.root),children:children});}export function PropertyListItem({children,ref:forwardedRef,...rest}){return/*#__PURE__*/_jsx("div",{...rest,"data-slot":"property-list-item",ref:forwardedRef,...props(propertyListStyles.item),children:children});}export function PropertyListLabel({children,ref:forwardedRef,...rest}){return/*#__PURE__*/_jsx("dt",{...rest,"data-slot":"property-list-label",ref:forwardedRef,...props(propertyListStyles.label),children:children});}export function PropertyListValue({children,ref:forwardedRef,...rest}){return/*#__PURE__*/_jsx("dd",{...rest,"data-slot":"property-list-value",ref:forwardedRef,...props(propertyListStyles.value),children:children});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{create}from"@stylexjs/stylex";import"../../styles/colors.stylex";import{colors}from"../../styles/colors.stylex";import"../../styles/conditions.stylex";import{conditions}from"../../styles/conditions.stylex";import"../../styles/spacing.stylex";import{space}from"../../styles/spacing.stylex";import"../../styles/typography.stylex";import{fontSize,fontWeight,lineHeight}from"../../styles/typography.stylex";export const propertyListStyles={item:{kGNEyG:"x1pha0wt",k1xSpc:"xrvj5dj",kOIVth:"xiw8qbs",kWZpDQ:"xx1abn8",kEXP64:"xcrlgei",kumcoG:"x4w6khx",k7Eaqz:"xeuugli",$$css:true},label:{kMwMTN:"x125omll",kGuDYH:"xlh8hku",k63SB2:"x1lo1l87",kLWn49:"x2xzzt7",kogj98:"x1ghz6dp",k7Eaqz:"xeuugli",kHjlTd:"x1mzt3pk",$$css:true},root:{k1xSpc:"xrvj5dj",kOIVth:"xp4ho6d",kumcoG:"x3x26eo x1mkdm3x",kogj98:"x1ghz6dp",$$css:true},value:{kMwMTN:"x14tvo57",kGuDYH:"x12ama9c",k63SB2:"x1lo1l87",kLWn49:"x1rn0pvf",kogj98:"x1ghz6dp",k7Eaqz:"xeuugli",kHjlTd:"xj0a0fe",k9WMMc:"x1yc453h",$$css:true}};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from "react";
|
|
2
|
+
import type { Closed } from "../../closed";
|
|
3
|
+
export interface QuestionCardOption {
|
|
4
|
+
/** A line on what choosing it means. */
|
|
5
|
+
description?: string;
|
|
6
|
+
label: string;
|
|
7
|
+
}
|
|
8
|
+
export interface QuestionCardQuestion {
|
|
9
|
+
description?: string;
|
|
10
|
+
id: string;
|
|
11
|
+
/** Allows several answers, with checkboxes. */
|
|
12
|
+
multiple?: boolean;
|
|
13
|
+
options: readonly QuestionCardOption[];
|
|
14
|
+
/** Offers "Something else" with a text field. On by default. */
|
|
15
|
+
other?: boolean;
|
|
16
|
+
/** The question, such as "Which store should sessions live in?". */
|
|
17
|
+
title: string;
|
|
18
|
+
}
|
|
19
|
+
/** Each question's chosen labels or typed text, by id. Skipped ones are empty. */
|
|
20
|
+
export type QuestionCardAnswers = Record<string, string[]>;
|
|
21
|
+
export type QuestionCardProps = Omit<Closed<ComponentPropsWithRef<"div">>, "children" | "data-slot" | "onSubmit" | "role"> & {
|
|
22
|
+
/** The answers given, for a card from history. */
|
|
23
|
+
answers?: QuestionCardAnswers;
|
|
24
|
+
/** Called once with every answer, after the last question. */
|
|
25
|
+
onSubmit?: (answers: QuestionCardAnswers) => void;
|
|
26
|
+
questions: readonly QuestionCardQuestion[];
|
|
27
|
+
/** `pending` while it asks; `answered` folds it into one line. */
|
|
28
|
+
status: "answered" | "pending";
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* The agent asks the person to choose, one question at a time: options
|
|
32
|
+
* with number keys, an answer in their own words, and Skip. Once answered,
|
|
33
|
+
* the card folds into one line that opens to every answer.
|
|
34
|
+
*/
|
|
35
|
+
export declare function QuestionCard({ answers, onSubmit, questions, ref: forwardedRef, status, ...rest }: QuestionCardProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";import{props}from"@stylexjs/stylex";import{useCallback,useId,useRef,useState}from"react";import{IconChevronDown,IconMessageQuestion}from"../../icons";import{typeRoles}from"../../styles/typography.styles";import{approvalCardStyles}from"../approval-card/approval-card.styles";import{Button}from"../button/button";import{Checkbox}from"../checkbox/checkbox";import{CheckboxGroup}from"../checkbox-group/checkbox-group";import{Collapsible,CollapsiblePanel,CollapsibleTrigger}from"../collapsible/collapsible";import{Radio}from"../radio/radio";import{RadioGroup}from"../radio-group/radio-group";import{toolCallStyles}from"../tool-call/tool-call.styles";import{visuallyHiddenStyles}from"../visually-hidden/visually-hidden.styles";import{questionCardStyles as styles}from"./question-card.styles";/** Each question's chosen labels or typed text, by id. Skipped ones are empty. */import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";const OTHER="__other__";const EMPTY={other:"",selected:[]};const DIGIT=/^[1-9]$/u;function answerOf(draft){if(!draft){return[];}return draft.selected.flatMap(value=>{if(value!==OTHER){return[value];}const text=draft.other.trim();return text?[text]:[];});}// Picking with a number key toggles in a checkbox list and selects in a
|
|
2
|
+
// radio list.
|
|
3
|
+
function pick(draft,value,multiple){if(!multiple){return{...draft,selected:[value]};}const selected=draft.selected.includes(value)?draft.selected.filter(item=>item!==value):[...draft.selected,value];return{...draft,selected};}function OptionRow({chosen,index,multiple,option}){const key=String(index+1);const control=multiple?/*#__PURE__*/_jsx(Checkbox,{"aria-keyshortcuts":key,size:"sm",value:option.label}):/*#__PURE__*/_jsx(Radio,{"aria-keyshortcuts":key,value:option.label});return(/*#__PURE__*/// biome-ignore lint/a11y/noLabelWithoutControl: the Radio or Checkbox inside is the control.
|
|
4
|
+
_jsxs("label",{"data-slot":"question-card-option",...props(styles.option,chosen&&styles.optionChosen),children:[/*#__PURE__*/_jsx("span",{...props(styles.optionControl),children:control}),/*#__PURE__*/_jsxs("span",{...props(styles.optionBody),children:[/*#__PURE__*/_jsx("span",{...props(typeRoles.ui),children:option.label}),option.description?/*#__PURE__*/_jsx("span",{...props(typeRoles.caption,styles.optionDescription),children:option.description}):null]}),index<9?/*#__PURE__*/_jsx("span",{"aria-hidden":"true",...props(typeRoles.caption,styles.key),children:key}):null]}));}// The last choice is the person's own words.
|
|
5
|
+
function OtherRow({chosen,multiple,onText,text}){const change=useCallback(event=>onText(event.currentTarget.value),[onText]);const control=multiple?/*#__PURE__*/_jsx(Checkbox,{"aria-label":"Something else",size:"sm",value:OTHER}):/*#__PURE__*/_jsx(Radio,{"aria-label":"Something else",value:OTHER});return/*#__PURE__*/_jsxs("div",{"data-slot":"question-card-other",...props(styles.option,styles.otherRow,chosen&&styles.optionChosen),children:[/*#__PURE__*/_jsx("span",{...props(styles.optionControl),children:control}),/*#__PURE__*/_jsx("input",{"aria-label":"Your own answer",onChange:change,placeholder:"Something else…",type:"text",value:text,...props(typeRoles.body,styles.other)})]});}function Choices({draft,labelledBy,onDraft,question}){const multiple=question.multiple===true;const choose=useCallback(value=>{const selected=Array.isArray(value)?value:[value];onDraft({...draft,selected:selected.map(String)});},[draft,onDraft]);// Typing an answer chooses it.
|
|
6
|
+
const type=useCallback(other=>{const chosen=draft.selected.includes(OTHER);const selected=chosen?draft.selected:pick(draft,OTHER,multiple).selected;onDraft({other,selected});},[draft,multiple,onDraft]);const rows=/*#__PURE__*/_jsxs(_Fragment,{children:[question.options.map((option,index)=>/*#__PURE__*/_jsx(OptionRow,{chosen:draft.selected.includes(option.label),index:index,multiple:multiple,option:option},option.label)),question.other===false?null:/*#__PURE__*/_jsx(OtherRow,{chosen:draft.selected.includes(OTHER),multiple:multiple,onText:type,text:draft.other})]});if(multiple){return/*#__PURE__*/_jsx(CheckboxGroup,{"aria-labelledby":labelledBy,onValueChange:choose,value:draft.selected,children:/*#__PURE__*/_jsx("div",{...props(styles.options),children:rows})});}return/*#__PURE__*/_jsx(RadioGroup,{"aria-labelledby":labelledBy,onValueChange:choose,value:draft.selected[0]??null,children:/*#__PURE__*/_jsx("div",{...props(styles.options),children:rows})});}function Asking({onSubmit,onDecide,questions}){const titleId=useId();const[step,setStep]=useState(0);const[drafts,setDrafts]=useState({});// Focus moves to each new question, so it is read first.
|
|
7
|
+
const moved=useRef(false);const focusQuestion=useCallback(node=>{if(node&&moved.current){moved.current=false;node.focus();}},[]);const question=questions[step];const draft=(question&&drafts[question.id])??EMPTY;const setDraft=useCallback(value=>{if(question){setDrafts(all=>({...all,[question.id]:value}));}},[question]);const last=step===questions.length-1;const go=useCallback((delta,skipping)=>{const kept=skipping&&question?{...drafts,[question.id]:EMPTY}:drafts;setDrafts(kept);if(delta>0&&last){onDecide();onSubmit?.(Object.fromEntries(questions.map(item=>[item.id,answerOf(kept[item.id])])));return;}moved.current=true;setStep(current=>current+delta);},[drafts,last,onDecide,onSubmit,question,questions]);const back=useCallback(()=>go(-1,false),[go]);const skip=useCallback(()=>go(1,true),[go]);const next=useCallback(()=>go(1,false),[go]);const keys=useCallback(event=>{const typing=event.target instanceof HTMLInputElement&&event.target.type==="text";const option=question?.options[Number(event.key)-1];if(typing||!DIGIT.test(event.key)||!option){return;}event.preventDefault();setDraft(pick(draft,option.label,question?.multiple===true));},[draft,question,setDraft]);if(!question){return null;}return(/*#__PURE__*/// biome-ignore lint/a11y/noNoninteractiveElementInteractions: number keys pick an option while focus is in the question; each option is also its own focusable control.
|
|
8
|
+
_jsxs("fieldset",{"aria-labelledby":titleId,onKeyDown:keys,...props(approvalCardStyles.card),children:[/*#__PURE__*/_jsxs("div",{...props(approvalCardStyles.head),children:[/*#__PURE__*/_jsxs("p",{...props(typeRoles.caption,approvalCardStyles.kind),children:[/*#__PURE__*/_jsx("span",{"aria-hidden":"true",...props(approvalCardStyles.kindIcon),children:/*#__PURE__*/_jsx(IconMessageQuestion,{size:16})}),"Question",questions.length>1?/*#__PURE__*/_jsxs("span",{...props(styles.progress),children:[step+1," of ",questions.length]}):null]}),/*#__PURE__*/_jsx("p",{id:titleId,ref:focusQuestion,tabIndex:-1,...props(typeRoles.subheading,styles.question),children:question.title},question.id),question.description?/*#__PURE__*/_jsx("p",{...props(typeRoles.ui,approvalCardStyles.description),children:question.description}):null]}),/*#__PURE__*/_jsx(Choices,{draft:draft,labelledBy:titleId,onDraft:setDraft,question:question},question.id),/*#__PURE__*/_jsxs("div",{...props(styles.footer),children:[step>0?/*#__PURE__*/_jsx(Button,{onClick:back,size:"sm",variant:"ghost",children:"Back"}):null,/*#__PURE__*/_jsx("span",{...props(styles.spacer)}),/*#__PURE__*/_jsx(Button,{onClick:skip,size:"sm",variant:"ghost",children:"Skip"}),/*#__PURE__*/_jsx(Button,{onClick:next,size:"sm",children:last?"Submit":"Next"})]})]}));}function summaryOf(questions,answers){const[only]=questions;if(questions.length===1&&only){const answer=answers[only.id]?.join(", ");return{label:only.title,value:answer||"Skipped"};}const given=questions.filter(item=>answers[item.id]?.length).length;return{label:`Answered ${given} of ${questions.length} questions`,value:undefined};}// Once answered, the card folds into one line that opens to every answer.
|
|
9
|
+
function Answered({answers,focusRef,questions}){const summary=summaryOf(questions,answers);return/*#__PURE__*/_jsx("div",{...props(toolCallStyles.root),children:/*#__PURE__*/_jsxs(Collapsible,{render:/*#__PURE__*/_jsx("div",{...props(toolCallStyles.clip)}),children:[/*#__PURE__*/_jsxs(CollapsibleTrigger,{ref:focusRef,render:/*#__PURE__*/_jsx("button",{type:"button",...props(typeRoles.ui,toolCallStyles.row)}),children:[/*#__PURE__*/_jsx("span",{"aria-hidden":"true",...props(toolCallStyles.icon),children:/*#__PURE__*/_jsx(IconMessageQuestion,{size:16})}),/*#__PURE__*/_jsxs("span",{...props(toolCallStyles.title),children:[summary.label,summary.value?/*#__PURE__*/_jsxs("span",{...props(toolCallStyles.name),children:[" · ",summary.value]}):null]}),/*#__PURE__*/_jsx(IconChevronDown,{"aria-hidden":"true",size:14,...props(toolCallStyles.chevron)})]}),/*#__PURE__*/_jsx(CollapsiblePanel,{children:/*#__PURE__*/_jsx("dl",{"data-slot":"question-card-answers",...props(toolCallStyles.panel,toolCallStyles.details,styles.answers),children:questions.map(item=>{const answer=answers[item.id]?.join(", ");return/*#__PURE__*/_jsxs("div",{...props(approvalCardStyles.detailRow),children:[/*#__PURE__*/_jsx("dt",{...props(typeRoles.caption,approvalCardStyles.detailLabel),children:item.title}),/*#__PURE__*/_jsx("dd",{...props(typeRoles.ui,styles.answer,!answer&&styles.skipped),children:answer||"Skipped"})]},item.id);})})})]})});}/**
|
|
10
|
+
* The agent asks the person to choose, one question at a time: options
|
|
11
|
+
* with number keys, an answer in their own words, and Skip. Once answered,
|
|
12
|
+
* the card folds into one line that opens to every answer.
|
|
13
|
+
*/export function QuestionCard({answers={},onSubmit,questions,ref:forwardedRef,status,...rest}){const decidedHere=useRef(false);const onDecide=useCallback(()=>{decidedHere.current=true;},[]);const focusRef=useCallback(node=>{if(node&&decidedHere.current){decidedHere.current=false;node.focus();}},[]);for(const prop of["className","data-slot","role","style"]){Reflect.deleteProperty(rest,prop);}const pending=status==="pending";return/*#__PURE__*/_jsxs("div",{...rest,"data-slot":"question-card","data-status":status,ref:forwardedRef,children:[/*#__PURE__*/_jsx("span",{"aria-live":"polite","data-slot":"question-card-status",role:"status",...props(visuallyHiddenStyles.root),children:pending?"":"Answered"}),pending?/*#__PURE__*/_jsx(Asking,{onDecide:onDecide,onSubmit:onSubmit,questions:questions}):/*#__PURE__*/_jsx(Answered,{answers:answers,focusRef:focusRef,questions:questions})]});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{create}from"@stylexjs/stylex";import"../../styles/colors.stylex";import{colors}from"../../styles/colors.stylex";import"../../styles/conditions.stylex";import{conditions}from"../../styles/conditions.stylex";import"../../styles/dimensions.stylex";import{controlSize}from"../../styles/dimensions.stylex";import"../../styles/interaction.stylex";import{borderWidth}from"../../styles/interaction.stylex";import"../../styles/shape.stylex";import{shape}from"../../styles/shape.stylex";import"../../styles/spacing.stylex";import{space}from"../../styles/spacing.stylex";import"../../styles/typography.stylex";import{lineHeight}from"../../styles/typography.stylex";export const questionCardStyles={answer:{kogj98:"x1ghz6dp",$$css:true},answers:{kGNEyG:"x1pha0wt",k1C7PZ:"xejpt2e",k1xSpc:"xrvj5dj",kumcoG:"xcjjqqt",kogj98:"x1ghz6dp",khm7nJ:"xfk3ji1",$$css:true},footer:{kGNEyG:"x6s0dn4",k1xSpc:"x78zum5",kOIVth:"xp4ho6d",$$css:true},key:{kGNEyG:"x6s0dn4",kZKoxP:"x15nbl1q",kMwMTN:"x125omll",k1xSpc:"x78zum5",kmuXW:"x2lah0s",kcqcaj:"xss6m8b",keTefX:"xvc5jky",$$css:true},option:{kGNEyG:"x1cy8zhl",kWkggS:"xxsa5ao x12ribo7 xjbqb8w",kaIpWk:"x2b34ud",kMwMTN:"x14tvo57",kkrTdU:"x1ypdohk",k1xSpc:"x78zum5",kOIVth:"xiw8qbs",k8WAf4:"x391bbb",kg3NbH:"xb5xqfq",$$css:true},optionBody:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x195vfkc",k7Eaqz:"xeuugli",$$css:true},optionChosen:{kWkggS:"xxsa5ao x1tqjgvh x1o7hn9x",$$css:true},optionControl:{k1xSpc:"x78zum5",kmuXW:"x2lah0s",kLKAdn:"x1nn3v0j",$$css:true},optionDescription:{kMwMTN:"x125omll",$$css:true},options:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x195vfkc",$$css:true},other:{k8Qsv1:"x10l60j5",kH8XJS:"x7xwk5j",kysU6D:"xjyslct",kWkggS:"xjbqb8w",kZKoxP:"x1sscbzi",kMzoRj:"xc342km",kB7OPa:"x9f619",kMwMTN:"x14tvo57",kzQI83:"x1iyjqo2",kogj98:"x1ghz6dp",k7Eaqz:"xeuugli",kI3sdo:"x1a2a7pz",kmVPX3:"x1717udv",$$css:true},otherRow:{kGNEyG:"x6s0dn4",kjBf7l:"x10f1rt7 x1uczgqu",kInvED:"x1wfwxd8",k3XXqK:"x1ae5oaz x1t137rt",kMeerF:"x1vhx2qj",$$css:true},progress:{kcqcaj:"xss6m8b",keTefX:"xvc5jky",$$css:true},question:{kMwMTN:"x14tvo57",kogj98:"x1ghz6dp",kI3sdo:"x1a2a7pz",$$css:true},skipped:{kMwMTN:"x125omll",$$css:true},spacer:{kzQI83:"x1iyjqo2",$$css:true}};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
import type { Closed } from "../../closed";
|
|
3
|
+
export interface RadarChartAxis {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
export interface RadarChartSeries {
|
|
8
|
+
id: string;
|
|
9
|
+
label: string;
|
|
10
|
+
/** One value per axis, in axis order. */
|
|
11
|
+
values: readonly number[];
|
|
12
|
+
}
|
|
13
|
+
export type RadarChartProps = Omit<Closed<ComponentPropsWithRef<"div">>, "aria-label" | "children" | "data-slot" | "role"> & {
|
|
14
|
+
"aria-description"?: string;
|
|
15
|
+
"aria-label": string;
|
|
16
|
+
/** Three to eight axes, clockwise from the top. */
|
|
17
|
+
axes: readonly RadarChartAxis[];
|
|
18
|
+
formatValue?: (value: number) => string;
|
|
19
|
+
/** Shows the series legend below the chart. Turn it off when a card header shows it. */
|
|
20
|
+
legend?: boolean;
|
|
21
|
+
locale?: string;
|
|
22
|
+
/** The value at the outer ring. Defaults to the largest value. */
|
|
23
|
+
max?: number;
|
|
24
|
+
/** Up to three series; any two can overlap, so only three hues stay distinct. */
|
|
25
|
+
series: readonly RadarChartSeries[];
|
|
26
|
+
};
|
|
27
|
+
/** Up to three profiles across three to eight measures on one scale. */
|
|
28
|
+
export declare function RadarChart({ "aria-description": ariaDescription, "aria-label": ariaLabel, axes, formatValue, legend, locale, max, ref: forwardedRef, series, ...rest }: RadarChartProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{create,props}from"@stylexjs/stylex";import{defineChart}from"@tanstack/charts";import{angleGrid,focusGroupAngle,polar,radialArea,radialGrid,radialLine}from"@tanstack/charts/polar";import{scaleLinear}from"@tanstack/charts/scales/linear";import{scalePoint}from"@tanstack/charts/scales/point";import{tooltip as tooltipFeature}from"@tanstack/charts/tooltip";import{curveLinearClosed}from"d3-shape";import{useMemo}from"react";import{colors}from"../../styles/colors.stylex";import"../../styles/spacing.stylex";import{space}from"../../styles/spacing.stylex";import{assertIdentity,assertNonNegative}from"../chart-frame/chart-assert";import{chartColors}from"../chart-frame/chart-colors";import{ChartFrame}from"../chart-frame/chart-frame";import{ChartLegend}from"../chart-legend/chart-legend";import{ChartTooltip}from"../chart-tooltip/chart-tooltip";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const NAME="RadarChart";const TONES=["series1","series2","series3"];const RINGS=[0.25,0.5,0.75,1];function seriesRows(entry,axes){const values=entry.values;if(!Array.isArray(values)||values.length!==axes.length){throw new RangeError(`${NAME} series need one value per axis.`);}return values.map((value,index)=>{assertNonNegative(NAME,value);const axis=axes[index].id;return{axis,id:`${entry.id}:${axis}`,series:entry.id,value};});}function prepare(axes,series){if(!Array.isArray(axes)||axes.length<3||axes.length>8){throw new RangeError(`${NAME} needs three to eight axes.`);}if(!Array.isArray(series)||series.length===0||series.length>3){throw new RangeError(`${NAME} needs one to three series.`);}const axisIds=new Set();for(const axis of axes){assertIdentity(NAME,axis,axisIds);}const seriesIds=new Set();return series.flatMap(entry=>{assertIdentity(NAME,entry,seriesIds);return seriesRows(entry,axes);});}function renderTooltip(context,axes,series,format){const point=context.primaryPoint??context.points[0];if(!point){return null;}const values=new Map(context.points.map(({datum})=>[datum.series,datum.value]));return/*#__PURE__*/_jsx(ChartTooltip,{items:series.flatMap(({id,label},index)=>values.has(id)?[{id,label,tone:TONES[index],value:format(values.get(id)??0)}]:[]),label:axes.find(({id})=>id===point.datum.axis)?.label});}function assertOptions(ariaLabel,max){if(typeof ariaLabel!=="string"||!ariaLabel.trim()){throw new TypeError(`${NAME} requires a non-empty aria-label.`);}if(max!==undefined&&!(Number.isFinite(max)&&max>0)){throw new RangeError(`${NAME} max must be positive.`);}}/** Up to three profiles across three to eight measures on one scale. */export function RadarChart({"aria-description":ariaDescription,"aria-label":ariaLabel,axes,formatValue,legend=true,locale="en-US",max,ref:forwardedRef,series,...rest}){assertOptions(ariaLabel,max);for(const name of["aria-label","children","className","data-slot","role","style"]){Reflect.deleteProperty(rest,name);}const rows=useMemo(()=>prepare(axes,series),[axes,series]);const format=useMemo(()=>formatValue??new Intl.NumberFormat(locale).format,[formatValue,locale]);const outer=max??Math.max(1,...rows.map(({value})=>value));const definition=useMemo(()=>{const labels=new Map(axes.map(({id,label})=>[id,label]));const tones=new Map(series.map(({id},index)=>[id,TONES[index]]));const toneOf=row=>chartColors[tones.get(row.series)??"series1"];const marks=series.flatMap(({id})=>{const own=rows.filter(row=>row.series===id);return[radialArea(own,{angle:"axis",curve:curveLinearClosed,fill:toneOf,fillOpacity:0.16,id:`radar-area-${id}`,key:"id",radius:"value"}),radialLine(own,{angle:"axis",curve:curveLinearClosed,id:`radar-line-${id}`,key:"id",points:true,radius:"value",stroke:toneOf,strokeWidth:2,z:"series"})];});return defineChart({marks:[polar({guides:[radialGrid({shape:"polygon",stroke:colors.border,strokeOpacity:1,values:RINGS.map(ring=>ring*outer)}),angleGrid({format:axis=>labels.get(String(axis))??String(axis),labels:true,stroke:colors.border,strokeOpacity:1})],marks,radiusRatio:0.72,scales:{angle:{scale:scalePoint().domain(axes.map(({id})=>id)),wrap:true},radius:{scale:scaleLinear().domain([0,outer])}}})],scales:{x:null,y:null}},{focus:focusGroupAngle,tooltip:tooltipFeature});},[axes,outer,rows,series]);const renderTooltipBody=useMemo(()=>context=>renderTooltip(context,axes,series,format),[axes,format,series]);return/*#__PURE__*/_jsxs("div",{...rest,"data-slot":"radar-chart",ref:forwardedRef,...{className:"xeuugli"},children:[/*#__PURE__*/_jsx(ChartFrame,{"aria-description":ariaDescription,"aria-label":ariaLabel,definition:definition,height:300,renderTooltipBody:renderTooltipBody,tabIndex:0}),legend&&series.length>1?/*#__PURE__*/_jsx("div",{...{className:"x1fynrwi"},children:/*#__PURE__*/_jsx(ChartLegend,{"aria-label":`${ariaLabel} series`,items:series.map(({id,label},index)=>({id,label,tone:TONES[index]}))})}):null]});}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from "react";
|
|
2
|
+
import type { Closed } from "../../closed";
|
|
3
|
+
export interface RadialBarsItem {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
value: number;
|
|
7
|
+
}
|
|
8
|
+
export type RadialBarsProps = Omit<Closed<ComponentPropsWithRef<"figure">>, "aria-label" | "children" | "data-slot" | "role"> & {
|
|
9
|
+
"aria-label": string;
|
|
10
|
+
formatValue?: (value: number) => string;
|
|
11
|
+
/** Up to six items, drawn largest outermost. */
|
|
12
|
+
items: readonly RadialBarsItem[];
|
|
13
|
+
locale?: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Concentric bars around a center, one per item, largest outermost. Read the
|
|
17
|
+
* exact values in the tiles; arc length is a quick ranking, not a measure.
|
|
18
|
+
*/
|
|
19
|
+
export declare function RadialBars({ "aria-label": ariaLabel, formatValue, items, locale, ref: forwardedRef, ...rest }: RadialBarsProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use client";import{create,props}from"@stylexjs/stylex";import{useMemo}from"react";import"../../styles/colors.stylex";import{colors}from"../../styles/colors.stylex";import"../../styles/shape.stylex";import{shape}from"../../styles/shape.stylex";import"../../styles/spacing.stylex";import{space}from"../../styles/spacing.stylex";import{typeRoles}from"../../styles/typography.styles";import"../../styles/typography.stylex";import{fontWeight}from"../../styles/typography.stylex";import{assertAriaLabel,assertIdentity,assertNonNegative}from"../chart-frame/chart-assert";import{chartColors}from"../chart-frame/chart-colors";import{ChartHoverTooltip,useChartHover}from"../chart-frame/chart-hover";import{RingGraphic}from"../chart-frame/ring-graphic";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const NAME="RadialBars";const TONES=["series1","series2","series3","series4","series5","series6"];const DIAMETER=200;const GAP=4;// The largest bar spans three quarters of a turn, which keeps outer rings from
|
|
2
|
+
// exaggerating their values as much as a full circle would.
|
|
3
|
+
const SWEEP=0.75;const _temp={kZKoxP:"x1qa65zt",kaIpWk:"x18zih8k",kmuXW:"x2lah0s",kzqmXN:"x1e7hgle","$$css":true};const styles={root:{kGNEyG:"x6s0dn4",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x1q60jeg",kogj98:"x1ghz6dp",k7Eaqz:"xeuugli",$$css:true},swatch:backgroundColor=>[_temp,{kWkggS:backgroundColor!=null?"xl8spv7":backgroundColor,$$css:true},{"--x-backgroundColor":backgroundColor!=null?backgroundColor:undefined}],tile:{kWkggS:"xwn18cz",kaIpWk:"x2b34ud",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x13hh4mm",k7Eaqz:"xeuugli",k8WAf4:"x391bbb",kg3NbH:"xy7odpl",$$css:true}};function assertItems(items){if(!Array.isArray(items)||items.length===0||items.length>TONES.length){throw new RangeError(`${NAME} needs one to six items.`);}const ids=new Set();for(const item of items){assertIdentity(NAME,item,ids);assertNonNegative(NAME,item.value);}}/**
|
|
4
|
+
* Concentric bars around a center, one per item, largest outermost. Read the
|
|
5
|
+
* exact values in the tiles; arc length is a quick ranking, not a measure.
|
|
6
|
+
*/export function RadialBars({"aria-label":ariaLabel,formatValue,items,locale="en-US",ref:forwardedRef,...rest}){assertAriaLabel(NAME,ariaLabel);assertItems(items);for(const name of["children","className","data-slot","role","style"]){Reflect.deleteProperty(rest,name);}const format=formatValue??new Intl.NumberFormat(locale).format;// Tones follow input order, so sorting never repaints an item.
|
|
7
|
+
const ranked=items.map((item,index)=>({...item,tone:TONES[index]})).sort((left,right)=>right.value-left.value);const max=ranked[0]?.value||1;const stroke=Math.min(16,DIAMETER*0.36/ranked.length-GAP);const hover=useChartHover();const{fade,hostRef,hostStyle,linkProps,markProps}=hover;// Hovering a bar shows its value; hovering a tile lights its bar.
|
|
8
|
+
const ringHover=useMemo(()=>{const tips=new Map(ranked.map(({id,label,tone,value})=>[id,{items:[{id,label,tone,value:format(value)}]}]));return{fade,markProps:id=>markProps(id,tips.get(id))};},[fade,format,markProps,ranked]);return/*#__PURE__*/_jsxs("figure",{...rest,"aria-label":ariaLabel,"data-slot":"radial-bars",ref:forwardedRef,...props(styles.root,typeRoles.ui),children:[/*#__PURE__*/_jsxs("div",{ref:hostRef,...props(hostStyle),children:[/*#__PURE__*/_jsx(RingGraphic,{diameter:DIAMETER,gap:GAP,hover:ringHover,rings:ranked.map(({id,tone,value})=>({fraction:value/max,id,tone})),stroke:stroke,sweep:SWEEP}),/*#__PURE__*/_jsx(ChartHoverTooltip,{hover:hover.hover})]}),/*#__PURE__*/_jsx("ul",{...{className:"xkh2ocl xrvj5dj xp4ho6d x1cmj9de xe8uvvx x1ghz6dp x1717udv"},children:items.map(({id,label,value},index)=>/*#__PURE__*/_jsxs("li",{"data-slot":"radial-bars-item",...linkProps(id),...props(styles.tile,...fade(id)),children:[/*#__PURE__*/_jsxs("span",{...{className:"x6s0dn4 x125omll x78zum5 xp4ho6d xeuugli"},children:[/*#__PURE__*/_jsx("span",{"aria-hidden":"true",...props(styles.swatch(chartColors[TONES[index]]))}),label]}),/*#__PURE__*/_jsx("span",{...{className:"x14tvo57 xss6m8b xuku2lm"},children:format(value)})]},id))})]});}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type RadioProps } from "./radio";
|
|
3
|
+
type RadioCardControlProps<Value> = Pick<RadioProps<Value>, "aria-describedby" | "id" | "inputRef" | "readOnly" | "required" | "value"> & {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
invalid?: boolean;
|
|
6
|
+
ref?: RadioProps<Value>["ref"];
|
|
7
|
+
size?: RadioProps<Value>["size"];
|
|
8
|
+
};
|
|
9
|
+
export type RadioCardProps<Value = unknown> = RadioCardControlProps<Value> & {
|
|
10
|
+
description?: ReactNode;
|
|
11
|
+
error?: ReactNode;
|
|
12
|
+
label: ReactNode;
|
|
13
|
+
};
|
|
14
|
+
export declare function RadioCard<Value = unknown>({ description, disabled, error, invalid, label, ...radioProps }: RadioCardProps<Value>): import("react").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{Field as BaseField}from"@base-ui/react/field";import{props}from"@stylexjs/stylex";import{useId}from"react";import{checkboxCardStyles}from"../checkbox/checkbox-card.styles";import{Field,FieldDescription,FieldError}from"../field/field";import{Radio}from"./radio";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export function RadioCard({description,disabled=false,error,invalid=false,label,...radioProps}){const labelId=useId();return/*#__PURE__*/_jsxs(Field,{disabled:disabled,invalid:invalid,children:[/*#__PURE__*/_jsxs(BaseField.Label,{...props(checkboxCardStyles.label),children:[/*#__PURE__*/_jsx(Radio,{...radioProps,"aria-labelledby":labelId,disabled:disabled,invalid:invalid}),/*#__PURE__*/_jsxs("span",{...props(checkboxCardStyles.content),children:[/*#__PURE__*/_jsx("span",{id:labelId,children:label}),description!==undefined&&description!==null?/*#__PURE__*/_jsx(FieldDescription,{render:/*#__PURE__*/_jsx("span",{}),children:description}):null]})]}),error!==undefined&&error!==null?/*#__PURE__*/_jsx(FieldError,{match:true,children:error}):null]});}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type RadioRootProps } from "@base-ui/react/radio";
|
|
2
|
+
export type RadioSize = "default" | "lg" | "sm";
|
|
3
|
+
export type RadioProps<Value = unknown> = Omit<RadioRootProps<Value>, "children" | "className" | "disabled" | "nativeButton" | "ref" | "render" | "style"> & {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
invalid?: boolean;
|
|
6
|
+
ref?: RadioRootProps<Value>["ref"];
|
|
7
|
+
size?: RadioSize;
|
|
8
|
+
};
|
|
9
|
+
export declare function Radio<Value = unknown>({ disabled, invalid, readOnly, ref: forwardedRef, size, ...rest }: RadioProps<Value>): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{Radio as BaseRadio}from"@base-ui/react/radio";import{props}from"@stylexjs/stylex";import{checkboxStyles}from"../checkbox/checkbox.styles";import{radioStyles}from"./radio.styles";import{jsx as _jsx}from"react/jsx-runtime";const sizeStyles={default:radioStyles.sizeDefault,lg:radioStyles.sizeLg,sm:radioStyles.sizeSm};export function Radio({disabled=false,invalid=false,readOnly=false,ref:forwardedRef=undefined,size="default",...rest}){return/*#__PURE__*/_jsx(BaseRadio.Root,{...rest,"aria-invalid":invalid||undefined,"data-slot":"radio",disabled:disabled,readOnly:readOnly,ref:forwardedRef,...props(checkboxStyles.base,checkboxStyles.forcedColorsSelected,radioStyles.root,sizeStyles[size]),children:/*#__PURE__*/_jsx(BaseRadio.Indicator,{"data-slot":"radio-indicator",...props(radioStyles.indicator)})});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{create}from"@stylexjs/stylex";import"../../styles/conditions.stylex";import{conditions}from"../../styles/conditions.stylex";import"../../styles/interaction.stylex";import{scale}from"../../styles/interaction.stylex";import"../../styles/motion.stylex";import{duration,easing}from"../../styles/motion.stylex";export const radioStyles={indicator:{kWkggS:"xtwfq29",kaIpWk:"x10hpsqq",k1xSpc:"x1lliihq",kZKoxP:"x164u9eo",kSiTet:"xiyypsa x1hw7zpd x1hc1fzr",kfzvcC:"x47corl",k3aq6I:"xsgl9vz x4hi2ee x3oybdh",kIyJzY:"x1e471i8 x1j5v3x2",k1ekBW:"x6o7n8i",kAMwcw:"x3us6rm x1bsmr72",kzqmXN:"x1jjc1wv",$$css:true},root:{kT0f0o:"x3hdh8v",kVL7Gh:"xr0m5pc",kfmiAY:"x9okykr",krdFHd:"x1142k65",k3aq6I:"xwwwllw x1f2vhwy x1c071of",$$css:true},sizeDefault:{kZKoxP:"xaylbqo",kzqmXN:"xsk17dz",$$css:true},sizeLg:{kZKoxP:"xmll18r",kzqmXN:"xwqq7k2",$$css:true},sizeSm:{kZKoxP:"x1l36t39",kzqmXN:"xcdlrvm",$$css:true}};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type RadioGroupProps as BaseRadioGroupProps } from "@base-ui/react/radio-group";
|
|
2
|
+
export type RadioGroupProps<Value = unknown> = Omit<BaseRadioGroupProps<Value>, "className" | "render" | "style">;
|
|
3
|
+
export declare function RadioGroup<Value = unknown>({ children, ref: forwardedRef, ...rest }: RadioGroupProps<Value>): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{RadioGroup as BaseRadioGroup}from"@base-ui/react/radio-group";import{props}from"@stylexjs/stylex";import{checkboxGroupStyles}from"../checkbox-group/checkbox-group.styles";import{jsx as _jsx}from"react/jsx-runtime";export function RadioGroup({children,ref:forwardedRef=undefined,...rest}){return/*#__PURE__*/_jsx(BaseRadioGroup,{...rest,ref:forwardedRef,...props(checkboxGroupStyles.root),children:children});}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
import type { Closed } from "../../closed";
|
|
3
|
+
import { type SankeyLink, type SankeyNode } from "./sankey-layout";
|
|
4
|
+
export type { SankeyLink, SankeyNode } from "./sankey-layout";
|
|
5
|
+
export type SankeyChartProps = Omit<Closed<ComponentPropsWithRef<"figure">>, "aria-label" | "children" | "data-slot" | "role"> & {
|
|
6
|
+
"aria-label": string;
|
|
7
|
+
formatValue?: (value: number) => string;
|
|
8
|
+
links: readonly SankeyLink[];
|
|
9
|
+
locale?: string;
|
|
10
|
+
/** Up to six sources on the left; each colors its ribbons. */
|
|
11
|
+
sources: readonly SankeyNode[];
|
|
12
|
+
/** Targets on the right, drawn in the neutral reference tone. */
|
|
13
|
+
targets: readonly SankeyNode[];
|
|
14
|
+
};
|
|
15
|
+
/** Flows from up to six sources to their targets, one ribbon per link. */
|
|
16
|
+
export declare function SankeyChart({ "aria-label": ariaLabel, formatValue, links, locale, ref: forwardedRef, sources, targets, ...rest }: SankeyChartProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{create,props}from"@stylexjs/stylex";import"../../styles/colors.stylex";import{colors}from"../../styles/colors.stylex";import"../../styles/motion.stylex";import{duration}from"../../styles/motion.stylex";import"../../styles/spacing.stylex";import{space}from"../../styles/spacing.stylex";import{typeRoles}from"../../styles/typography.styles";import"../../styles/typography.stylex";import{fontWeight}from"../../styles/typography.stylex";import{assertIdentity,assertNonNegative}from"../chart-frame/chart-assert";import{chartColors}from"../chart-frame/chart-colors";import{ChartDataTable}from"../chart-frame/chart-data-table";import{ChartHoverTooltip,useChartHover}from"../chart-frame/chart-hover";import{Table,TableBody,TableCaption,TableCell,TableContainer,TableHead,TableHeader,TableRow}from"../table/table";import{layoutSankey,ribbonPath}from"./sankey-layout";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";const NAME="SankeyChart";const TONES=["series1","series2","series3","series4","series5","series6"];const HEIGHT=320;const PADDING=12;const NODE=8;const RIBBON_WIDTH=1000;const _temp={kZKoxP:"xyq6l7l",kaIpWk:"x18zih8k",k87sOh:"x5mnzd7",kkqhue:"x17y0mx6",kVAEAm:"x10l6tqk","$$css":true};const _temp2={k87sOh:"x5mnzd7",kkqhue:"x17y0mx6",kVQacm:"xb3r6kr",kVAEAm:"x10l6tqk",kg5iWk:"xlyipyv",k3aq6I:"x1cb1t30",khDVqt:"xuxw1ft","$$css":true};const styles={bar:(top,blockSize,backgroundColor)=>[_temp,{kWkggS:backgroundColor!=null?"xl8spv7":backgroundColor,$$css:true},{"--x-backgroundColor":backgroundColor!=null?backgroundColor:undefined,"--x-blockSize":(val=>typeof val==="number"?val+"px":val!=null?val:undefined)(Math.max(blockSize,2)),"--x-insetBlockStart":(val=>typeof val==="number"?val+"px":val!=null?val:undefined)(top)}],barSource:{kT0f0o:"x16uus16",kfmiAY:"x1ga7v0g",$$css:true},barTarget:{kVL7Gh:"xbiv7yw",krdFHd:"x15mokao",$$css:true},label:top=>[_temp2,{"--x-insetBlockStart":(val=>typeof val==="number"?val+"px":val!=null?val:undefined)(top)}],labelEnd:{kwRFfy:"xuvjzps",k9WMMc:"xp4054r",$$css:true},labelStart:{kZCmMZ:"xt0na8i",$$css:true},plot:{k1xSpc:"xrvj5dj",kumcoG:"xyhz18g",$$css:true},ribbon:{kSiTet:"xk8c4ds",kIyJzY:"x1j5v3x2",k1ekBW:"x19991ni",$$css:true},ribbonFaint:{kSiTet:"x1kzsush",$$css:true},ribbonStrong:{kSiTet:"xmu36h7",$$css:true},root:{kogj98:"x1ghz6dp",k7Eaqz:"xeuugli",$$css:true},sizer:{kZKoxP:"xqtp20y",kVQacm:"xb3r6kr",k33iCy:"xlshs6z",khDVqt:"xuxw1ft",$$css:true}};function assertNodes(sources,targets){if(!Array.isArray(sources)||sources.length===0||sources.length>TONES.length){throw new RangeError(`${NAME} needs one to six sources.`);}if(!Array.isArray(targets)||targets.length===0){throw new RangeError(`${NAME} needs at least one target.`);}const sourceIds=new Set();const targetIds=new Set();for(const node of sources){assertIdentity(NAME,node,sourceIds);}for(const node of targets){assertIdentity(NAME,node,targetIds);}return{sourceIds,targetIds};}function assertInput(sources,targets,links){const{sourceIds,targetIds}=assertNodes(sources,targets);if(!Array.isArray(links)){throw new TypeError(`${NAME} links must be an array.`);}for(const{source,target,value}of links){if(!(sourceIds.has(source)&&targetIds.has(target))){throw new RangeError(`${NAME} links must join a known source and target.`);}assertNonNegative(NAME,value);}}function NodeLabels({align,nodes}){const side=align==="end"?styles.labelEnd:styles.labelStart;const text=node=>/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx("span",{...{className:"x14tvo57 xuku2lm"},children:node.label}),/*#__PURE__*/_jsxs("span",{...{className:"x125omll"},children:[" ",node.detail]})]});return/*#__PURE__*/_jsxs("div",{"aria-hidden":"true",...{className:"xu3xrit xeuugli x1n2onr6"},children:[/*#__PURE__*/_jsx("div",{...props(styles.sizer,side),children:nodes.map(node=>/*#__PURE__*/_jsx("div",{children:text(node)},node.id))}),nodes.map(node=>/*#__PURE__*/_jsx("div",{...props(styles.label(node.top+node.height/2),side),children:text(node)},node.id))]});}/** Flows from up to six sources to their targets, one ribbon per link. */export function SankeyChart({"aria-label":ariaLabel,formatValue,links,locale="en-US",ref:forwardedRef,sources,targets,...rest}){if(typeof ariaLabel!=="string"||!ariaLabel.trim()){throw new TypeError(`${NAME} requires a non-empty aria-label.`);}assertInput(sources,targets,links);for(const name of["aria-label","children","className","data-slot","role","style"]){Reflect.deleteProperty(rest,name);}const format=formatValue??new Intl.NumberFormat(locale).format;const share=new Intl.NumberFormat(locale,{maximumFractionDigits:0,style:"percent"});const layout=layoutSankey(sources,targets,links,HEIGHT,PADDING);const tones=new Map(sources.map(({id},index)=>[id,chartColors[TONES[index]]]));const labels=new Map([...sources,...targets].map(({id,label})=>[id,label]));const toneKeys=new Map(sources.map(({id},index)=>[id,TONES[index]]));const hover=useChartHover();const{active,hostRef,hostStyle,linkProps,markProps}=hover;const ribbonEmphasis=({source,target})=>{if(active===null){return null;}const touched=[`${source}:${target}`,source,target].includes(active);return touched?styles.ribbonStrong:styles.ribbonFaint;};return/*#__PURE__*/_jsxs("figure",{...rest,"aria-label":ariaLabel,"data-slot":"sankey-chart",ref:forwardedRef,...props(styles.root,typeRoles.ui),children:[/*#__PURE__*/_jsxs("div",{ref:hostRef,...props(styles.plot,hostStyle),children:[/*#__PURE__*/_jsx(NodeLabels,{align:"end",nodes:layout.left.map(node=>({...node,detail:format(node.value)}))}),/*#__PURE__*/_jsx("div",{"aria-hidden":"true",...{className:"xu3xrit xeuugli x1n2onr6"},children:layout.left.map(({height,id,top})=>/*#__PURE__*/_jsx("span",{...linkProps(id),...props(styles.bar(top,height,tones.get(id)??""),styles.barSource)},id))}),/*#__PURE__*/_jsx("svg",{"aria-hidden":"true",preserveAspectRatio:"none",viewBox:`0 0 ${RIBBON_WIDTH} ${HEIGHT}`,...{className:"xu3xrit x1lliihq xh8yej3"},children:layout.links.map(link=>/*#__PURE__*/_jsx("path",{d:ribbonPath(link,RIBBON_WIDTH),fill:tones.get(link.source),...markProps(`${link.source}:${link.target}`,{items:[{id:link.target,label:labels.get(link.target),tone:toneKeys.get(link.source)??"series1",value:format(link.value)}],label:`${labels.get(link.source)} →`}),...props(styles.ribbon,ribbonEmphasis(link))},`${link.source}:${link.target}`))}),/*#__PURE__*/_jsx("div",{"aria-hidden":"true",...{className:"xu3xrit xeuugli x1n2onr6"},children:layout.right.map(({height,id,top})=>/*#__PURE__*/_jsx("span",{...linkProps(id),...props(styles.bar(top,height,colors.chartReference),styles.barTarget)},id))}),/*#__PURE__*/_jsx(NodeLabels,{align:"start",nodes:layout.right.map(node=>({...node,detail:`· ${share.format(node.value/(layout.total||1))}`}))}),/*#__PURE__*/_jsx(ChartHoverTooltip,{hover:hover.hover})]}),/*#__PURE__*/_jsx(ChartDataTable,{children:/*#__PURE__*/_jsx(TableContainer,{"aria-label":`${ariaLabel} data`,children:/*#__PURE__*/_jsxs(Table,{children:[/*#__PURE__*/_jsxs(TableCaption,{children:[ariaLabel," flows"]}),/*#__PURE__*/_jsx(TableHeader,{sticky:false,children:/*#__PURE__*/_jsxs(TableRow,{children:[/*#__PURE__*/_jsx(TableHead,{scope:"col",children:"From"}),/*#__PURE__*/_jsx(TableHead,{scope:"col",children:"To"}),/*#__PURE__*/_jsx(TableHead,{scope:"col",children:"Value"})]})}),/*#__PURE__*/_jsx(TableBody,{children:layout.links.map(({source,target,value})=>/*#__PURE__*/_jsxs(TableRow,{children:[/*#__PURE__*/_jsx(TableCell,{children:labels.get(source)}),/*#__PURE__*/_jsx(TableCell,{children:labels.get(target)}),/*#__PURE__*/_jsx(TableCell,{numeric:true,children:format(value)})]},`${source}:${target}`))})]})})})]});}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface SankeyNode {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
}
|
|
5
|
+
export interface SankeyLink {
|
|
6
|
+
source: string;
|
|
7
|
+
target: string;
|
|
8
|
+
value: number;
|
|
9
|
+
}
|
|
10
|
+
export interface PlacedNode extends SankeyNode {
|
|
11
|
+
height: number;
|
|
12
|
+
top: number;
|
|
13
|
+
value: number;
|
|
14
|
+
}
|
|
15
|
+
export interface PlacedLink extends SankeyLink {
|
|
16
|
+
sourceTop: number;
|
|
17
|
+
targetTop: number;
|
|
18
|
+
thickness: number;
|
|
19
|
+
}
|
|
20
|
+
export declare function layoutSankey(sources: readonly SankeyNode[], targets: readonly SankeyNode[], links: readonly SankeyLink[], height: number, padding: number): {
|
|
21
|
+
left: PlacedNode[];
|
|
22
|
+
links: {
|
|
23
|
+
source: string;
|
|
24
|
+
target: string;
|
|
25
|
+
value: number;
|
|
26
|
+
sourceTop: number;
|
|
27
|
+
targetTop: number;
|
|
28
|
+
thickness: number;
|
|
29
|
+
}[];
|
|
30
|
+
right: PlacedNode[];
|
|
31
|
+
total: number;
|
|
32
|
+
};
|
|
33
|
+
/** A ribbon from x 0 to `width` with an S-curve through the middle. */
|
|
34
|
+
export declare function ribbonPath(link: PlacedLink, width: number): string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// A two-column Sankey layout: sources on the left, targets on the right, and
|
|
2
|
+
// one ribbon per link. Positions are in pixels along a fixed plot height.
|
|
3
|
+
function placeColumn(nodes,totals,height,padding,scale){const used=nodes.reduce((sum,{id})=>sum+(totals.get(id)??0)*scale,0);const free=height-used-padding*(nodes.length-1);let top=Math.max(0,free/2);return nodes.map(node=>{const value=totals.get(node.id)??0;const placed={...node,height:value*scale,top,value};top+=placed.height+padding;return placed;});}function sumBy(links,key){const totals=new Map();for(const link of links){totals.set(link[key],(totals.get(link[key])??0)+link.value);}return totals;}export function layoutSankey(sources,targets,links,height,padding){const sourceTotals=sumBy(links,"source");const targetTotals=sumBy(links,"target");const total=links.reduce((sum,{value})=>sum+value,0);const gaps=padding*Math.max(sources.length,targets.length)-padding;const scale=total>0?(height-gaps)/total:0;const left=placeColumn(sources,sourceTotals,height,padding,scale);const right=placeColumn(targets,targetTotals,height,padding,scale);// Links stack inside each node in the order of the opposite column, so
|
|
4
|
+
// ribbons cross as little as a two-column layout allows.
|
|
5
|
+
const sourceOffset=new Map(left.map(({id,top})=>[id,top]));const targetOffset=new Map(right.map(({id,top})=>[id,top]));const sourceOrder=new Map(sources.map(({id},index)=>[id,index]));const targetOrder=new Map(targets.map(({id},index)=>[id,index]));const ordered=[...links].sort((a,b)=>(sourceOrder.get(a.source)??0)-(sourceOrder.get(b.source)??0)||(targetOrder.get(a.target)??0)-(targetOrder.get(b.target)??0));const placed=ordered.map(link=>{const thickness=link.value*scale;const sourceTop=sourceOffset.get(link.source)??0;sourceOffset.set(link.source,sourceTop+thickness);return{...link,sourceTop,targetTop:0,thickness};});const byTarget=[...placed].sort((a,b)=>(targetOrder.get(a.target)??0)-(targetOrder.get(b.target)??0)||(sourceOrder.get(a.source)??0)-(sourceOrder.get(b.source)??0));for(const link of byTarget){const top=targetOffset.get(link.target)??0;link.targetTop=top;targetOffset.set(link.target,top+link.thickness);}return{left,links:placed,right,total};}/** A ribbon from x 0 to `width` with an S-curve through the middle. */export function ribbonPath(link,width){const{sourceTop:s0,targetTop:t0,thickness}=link;const mid=width/2;const s1=s0+thickness;const t1=t0+thickness;return`M0,${s0} C${mid},${s0} ${mid},${t0} ${width},${t0} L${width},${t1} C${mid},${t1} ${mid},${s1} 0,${s1} Z`;}
|