@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,27 @@
|
|
|
1
|
+
// The scroll engine behind MessageScroller. It attaches to the viewport, the
|
|
2
|
+
// log, and the spacer through ref callbacks, so it needs no effects, and
|
|
3
|
+
// React reads its state through useSyncExternalStore.
|
|
4
|
+
/** Distance from the end, in px, that still counts as at the end. */const EDGE=16;/** How much of the previous turn stays in view above a new anchor. */const PEEK=64;const LABEL_LENGTH=80;const REPLY_LENGTH=160;const ITEM="[data-message-id]";// A turn boundary: marked so, or "auto" holding the reader's own Message.
|
|
5
|
+
const ANCHOR="[data-scroll-anchor='true'], [data-scroll-anchor='auto']:has([data-slot='message'][data-from='user'][data-align='end'])";const BACK_KEYS=new Set(["ArrowUp","Home","PageUp"]);function reducedMotion(){return typeof matchMedia==="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches;}// Where an element sits in the scrolled content, from layout alone, so a
|
|
6
|
+
// row still rising into place measures where it will land.
|
|
7
|
+
function layoutTop(element,viewport){let top=0;let node=element;while(node instanceof HTMLElement&&node!==viewport){top+=node.offsetTop;node=node.offsetParent;}if(node===viewport){return top;}return viewport.scrollTop+element.getBoundingClientRect().top-viewport.getBoundingClientRect().top;}const TEXT="[data-slot='message-text'], [data-slot='streaming-text']";function clip(text,length){const line=text.replace(/\s+/gu," ").trim();return line.length>length?`${line.slice(0,length-1)}…`:line;}function labelOf(item){const text=item.querySelector(TEXT)?.textContent??item.textContent;return clip(text??"",LABEL_LENGTH);}// The first message text among the rows after an anchor, up to the next one.
|
|
8
|
+
function replyOf(item){let row=item.nextElementSibling;while(row&&!row.matches(ANCHOR)){const text=row.querySelector(TEXT)?.textContent;if(text){return clip(text,REPLY_LENGTH);}row=row.nextElementSibling;}return"";}function anchorsIn(log){return[...log.querySelectorAll(ANCHOR)].map(item=>({id:item.dataset.messageId??"",label:labelOf(item),reply:replyOf(item)}));}function sameAnchors(a,b){return a.length===b.length&&a.every((item,index)=>item.id===b[index]?.id&&item.label===b[index]?.label&&item.reply===b[index]?.reply);}export class MessageScrollerStore{viewport=null;log=null;spacer=null;/** following: growing content keeps the view at the end. started: the view has opened at the end. */mode={following:true,started:false};/** The last turn sent while watching; it settles near the top. */anchor=null;/** A scroll position the store set itself, until the view reaches it. */target=null;/** The first item in view and its offset, so the view can hold still. */reference=null;snapshot={anchors:[],atEnd:true,current:null};listeners=new Set();subscribe=listener=>{this.listeners.add(listener);return()=>{this.listeners.delete(listener);};};getSnapshot=()=>this.snapshot;/** True once the view is on screen: rows from now on are new arrivals. */isLive=()=>this.viewport!==null;attachLog=log=>{if(!log){return;}this.log=log;const resize=new ResizeObserver(()=>this.onLayout());const mutation=new MutationObserver(records=>this.onMutation(records));resize.observe(log);// aria-busy turning off means the reply ended.
|
|
9
|
+
mutation.observe(log,{attributeFilter:["aria-busy"],attributes:true,childList:true});return()=>{resize.disconnect();mutation.disconnect();this.log=null;};};attachSpacer=spacer=>{this.spacer=spacer;};attachViewport=viewport=>{if(!viewport){return;}this.viewport=viewport;const resize=new ResizeObserver(()=>this.onLayout());resize.observe(viewport);viewport.addEventListener("scroll",this.onScroll,{passive:true});viewport.addEventListener("wheel",this.onIntent,{passive:true});viewport.addEventListener("touchstart",this.onIntent,{passive:true});viewport.addEventListener("keydown",this.onKey);this.start();return()=>{resize.disconnect();viewport.removeEventListener("scroll",this.onScroll);viewport.removeEventListener("wheel",this.onIntent);viewport.removeEventListener("touchstart",this.onIntent);viewport.removeEventListener("keydown",this.onKey);this.viewport=null;};};/** Scrolls to the newest content and follows it again. */scrollToEnd=(behavior="smooth")=>{this.mode.following=true;this.scrollTo(Number.POSITIVE_INFINITY,behavior);};/** Scrolls a message to the top of the view, the previous turn peeking. */scrollToMessage=(id,behavior="smooth")=>{const item=this.log?.querySelector(`[data-message-id="${CSS.escape(id)}"]`);if(!item){return false;}this.mode.following=false;this.scrollTo(this.offsetOf(item)-PEEK,behavior);return true;};// Opens at the end once there is something to show, without motion.
|
|
10
|
+
start(){const{log,viewport}=this;if(this.mode.started||!(log&&viewport)||log.childElementCount===0){return;}this.mode.started=true;this.scrollTo(Number.POSITIVE_INFINITY,"instant");this.update();}offsetOf(item){const{viewport}=this;if(!viewport){return 0;}return layoutTop(item,viewport);}scrollTo(top,behavior){const{viewport}=this;if(!viewport){return;}const end=viewport.scrollHeight-viewport.clientHeight;this.target=Math.max(0,Math.min(top,end));viewport.scrollTo({behavior:reducedMotion()?"instant":behavior,top:this.target});}// Wheel, touch, and keys going back mean the reader is taking over.
|
|
11
|
+
onIntent=()=>{this.target=null;};onKey=event=>{if(BACK_KEYS.has(event.key)){this.target=null;}};onScroll=()=>{const{viewport}=this;if(!viewport){return;}if(this.target===null){// The reader scrolled: follow again only from the end.
|
|
12
|
+
this.mode.following=this.distance()<=EDGE;}else if(Math.abs(viewport.scrollTop-this.target)<1){this.target=null;}this.remember();this.update();};onLayout(){this.start();this.sizeSpacer();if(this.mode.following){this.scrollTo(Number.POSITIVE_INFINITY,"instant");}else{this.holdStill();}this.update();}onMutation(records){// Sending often marks the log busy and adds the turn in one update, so
|
|
13
|
+
// both are handled.
|
|
14
|
+
if(records.some(record=>record.type==="attributes")){this.onBusyChange();}if(!records.some(record=>record.type==="childList")){return;}const sent=this.mode.started?this.sentTurn(records):null;if(sent){this.settle(sent);}else{this.onLayout();}}// The newest anchor among rows just added at the end: a send often adds
|
|
15
|
+
// the person's turn and the reply's first row in one go.
|
|
16
|
+
sentTurn(records){const added=new Set(records.flatMap(record=>[...record.addedNodes]));let node=this.log?.lastElementChild??null;while(node&&added.has(node)){if(node instanceof HTMLElement&&node.matches(ANCHOR)){return node;}node=node.previousElementSibling;}return null;}// A turn the person just sent moves near the top; the reply grows under
|
|
17
|
+
// it, and the view stays put until the reader scrolls.
|
|
18
|
+
settle(item){this.anchor=item;this.mode.following=false;this.sizeSpacer();this.scrollTo(this.offsetOf(item)-PEEK,"smooth");this.update();}// Once the reply ends, the blank room under it eases away, so a short
|
|
19
|
+
// reply comes to rest just above whatever sits below the transcript.
|
|
20
|
+
onBusyChange(){const{anchor,log,spacer}=this;if(!(anchor&&log&&spacer)||log.hasAttribute("aria-busy")){return;}this.anchor=null;spacer.style.transition=reducedMotion()?"none":"height 280ms cubic-bezier(0.16, 1, 0.3, 1)";spacer.style.height="0px";}// Room under a short reply, so its turn can sit near the top.
|
|
21
|
+
sizeSpacer(){const{anchor,log,spacer,viewport}=this;if(!(spacer&&log&&viewport)){return;}// Sizing for a new turn is instant; only the release eases.
|
|
22
|
+
if(anchor){spacer.style.transition="none";}if(!anchor?.isConnected){spacer.style.height="0px";return;}const below=layoutTop(log,viewport)+log.offsetHeight-layoutTop(anchor,viewport);const padding=Number.parseFloat(getComputedStyle(viewport).paddingBottom);const room=viewport.clientHeight-PEEK-below-(padding||0);spacer.style.height=`${Math.max(0,room)}px`;}distance(){const{viewport}=this;if(!viewport){return 0;}return viewport.scrollHeight-viewport.scrollTop-viewport.clientHeight;}// How much of the transcript is still below the view. The spacer under a
|
|
23
|
+
// settled turn is blank, so it does not count.
|
|
24
|
+
unseen(){const{log,viewport}=this;if(!(log&&viewport)){return 0;}return log.getBoundingClientRect().bottom-viewport.getBoundingClientRect().bottom;}// The first item in view, so a change above it can be undone.
|
|
25
|
+
remember(){const{log,viewport}=this;if(!(log&&viewport)){return;}const{top}=viewport.getBoundingClientRect();const item=[...log.querySelectorAll(ITEM)].find(node=>node.getBoundingClientRect().bottom>top);this.reference=item?{item,top:item.getBoundingClientRect().top-top}:null;}// Older messages loaded above, or a turn above grew: keep the reader's line.
|
|
26
|
+
holdStill(){const{reference,viewport}=this;if(!(reference?.item.isConnected&&viewport)||this.target!==null){return;}const now=reference.item.getBoundingClientRect().top-viewport.getBoundingClientRect().top;const shift=now-reference.top;if(Math.abs(shift)>=1){viewport.scrollTop+=shift;}}currentAnchor(){const{log,viewport}=this;if(!(log&&viewport)){return null;}// The turn being read: the last one starting above the middle.
|
|
27
|
+
const box=viewport.getBoundingClientRect();const line=box.top+box.height/2;let current=null;for(const item of log.querySelectorAll(ANCHOR)){if(item.getBoundingClientRect().top>line){break;}current=item.dataset.messageId??null;}return current??this.snapshot.anchors[0]?.id??null;}update(){const{log}=this;if(!log){return;}const anchors=anchorsIn(log);const next={anchors:sameAnchors(anchors,this.snapshot.anchors)?this.snapshot.anchors:anchors,atEnd:this.unseen()<=EDGE,current:this.currentAnchor()};const previous=this.snapshot;if(next.anchors===previous.anchors&&next.atEnd===previous.atEnd&&next.current===previous.current){return;}this.snapshot=next;for(const listener of this.listeners){listener();}}}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from "react";
|
|
2
|
+
import type { Closed } from "../../closed";
|
|
3
|
+
import { type MessageScrollerSnapshot } from "./message-scroller-store";
|
|
4
|
+
export type { MessageScrollerAnchor, MessageScrollerSnapshot, } from "./message-scroller-store";
|
|
5
|
+
/** The scroller's state: whether the view is at the end, and the turns. */
|
|
6
|
+
export declare function useMessageScrollerState(): MessageScrollerSnapshot;
|
|
7
|
+
/** Commands for custom controls: jump to the end, or to a message. */
|
|
8
|
+
export declare function useMessageScroller(): {
|
|
9
|
+
scrollToEnd: (behavior?: ScrollBehavior) => void;
|
|
10
|
+
scrollToMessage: (id: string, behavior?: ScrollBehavior) => boolean;
|
|
11
|
+
};
|
|
12
|
+
type Part<Element extends "div" | "button"> = Omit<Closed<ComponentPropsWithRef<Element>>, "data-slot">;
|
|
13
|
+
export type MessageScrollerProps = Part<"div"> & {
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* A scrolling transcript. It opens at the end and follows new content while
|
|
18
|
+
* the reader is there; a turn the person sends settles near the top with the
|
|
19
|
+
* reply growing under it; and the reader's place holds when older messages
|
|
20
|
+
* load above. It fills a parent with a bounded height.
|
|
21
|
+
*/
|
|
22
|
+
export declare function MessageScroller({ children, ...rest }: MessageScrollerProps): import("react").JSX.Element;
|
|
23
|
+
export type MessageScrollerViewportProps = Part<"div"> & {
|
|
24
|
+
/** Names the scrolling region. */
|
|
25
|
+
"aria-label"?: string;
|
|
26
|
+
children: ReactNode;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* The scrolling region, a Scroll Area: a thin thumb shows on hover and
|
|
30
|
+
* while scrolling, and the edges fade where more waits. It is focusable,
|
|
31
|
+
* so the keyboard can scroll it.
|
|
32
|
+
*/
|
|
33
|
+
export declare function MessageScrollerViewport({ "aria-label": ariaLabel, children, ...rest }: MessageScrollerViewportProps): import("react").JSX.Element;
|
|
34
|
+
export type MessageScrollerContentProps = Part<"div"> & {
|
|
35
|
+
/** True while a reply streams, so assistive tech waits for it. */
|
|
36
|
+
busy?: boolean;
|
|
37
|
+
children: ReactNode;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* The transcript itself, a live log that announces new turns. Every direct
|
|
41
|
+
* child is a MessageScrollerItem.
|
|
42
|
+
*/
|
|
43
|
+
export declare function MessageScrollerContent({ busy, children, ...rest }: MessageScrollerContentProps): import("react").JSX.Element;
|
|
44
|
+
export type MessageScrollerItemProps = Part<"div"> & {
|
|
45
|
+
children: ReactNode;
|
|
46
|
+
/** A stable id, for jumping to it and for holding the reader's place. */
|
|
47
|
+
messageId: string;
|
|
48
|
+
/**
|
|
49
|
+
* Marks a turn boundary, usually the person's message: once sent, it
|
|
50
|
+
* settles near the top, and a navigation rail lists it. `auto` anchors
|
|
51
|
+
* the item when it holds the reader's own Message (from the user,
|
|
52
|
+
* aligned to the end).
|
|
53
|
+
*/
|
|
54
|
+
scrollAnchor?: boolean | "auto";
|
|
55
|
+
};
|
|
56
|
+
export declare function MessageScrollerItem({ children, messageId, scrollAnchor, ...rest }: MessageScrollerItemProps): import("react").JSX.Element;
|
|
57
|
+
export type MessageScrollerButtonProps = Omit<Part<"button">, "children" | "onClick" | "type"> & {
|
|
58
|
+
/** Read by screen readers; the button shows an arrow. */
|
|
59
|
+
"aria-label"?: string;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* A round arrow that jumps to the newest content. It fades in when there is
|
|
63
|
+
* something below the view and leaves the tab order when there is not.
|
|
64
|
+
*/
|
|
65
|
+
export declare function MessageScrollerButton({ "aria-label": ariaLabel, ...rest }: MessageScrollerButtonProps): import("react").JSX.Element;
|
|
66
|
+
export interface MessageScrollerNavigationProps {
|
|
67
|
+
/** Names the rail for assistive tech. */
|
|
68
|
+
"aria-label"?: string;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* A rail of ticks along the end edge, one per turn boundary. Hover or focus
|
|
72
|
+
* a tick to preview the turn and the start of its reply; press it to jump
|
|
73
|
+
* there. It shows from two turns, and floats over the nearest positioned
|
|
74
|
+
* box, so keep the thread's end edge clear of it.
|
|
75
|
+
*/
|
|
76
|
+
export declare function MessageScrollerNavigation({ "aria-label": ariaLabel, }: MessageScrollerNavigationProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";import{ScrollArea as BaseScrollArea}from"@base-ui/react/scroll-area";import{props}from"@stylexjs/stylex";import{domAnimation,LazyMotion,MotionConfig,m}from"motion/react";import{createContext,useCallback,useContext,useState,useSyncExternalStore}from"react";import{IconArrowDown}from"../../icons";import{buttonStyles}from"../button/button.styles";import{scrollAreaStyles}from"../scroll-area/scroll-area.styles";import{Tooltip,TooltipCreateHandle,TooltipPrimitive,TooltipTrigger}from"../tooltip/tooltip";import{tooltipStyles}from"../tooltip/tooltip.styles";import{messageScrollerStyles as styles}from"./message-scroller.styles";import{MessageScrollerStore}from"./message-scroller-store";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";const StoreContext=createContext(null);function useStore(){const store=useContext(StoreContext);if(!store){throw new Error("MessageScroller parts must sit inside MessageScroller.");}return store;}/** The scroller's state: whether the view is at the end, and the turns. */export function useMessageScrollerState(){const store=useStore();return useSyncExternalStore(store.subscribe,store.getSnapshot,store.getSnapshot);}/** Commands for custom controls: jump to the end, or to a message. */export function useMessageScroller(){const store=useStore();return{scrollToEnd:store.scrollToEnd,scrollToMessage:store.scrollToMessage};}/**
|
|
2
|
+
* A scrolling transcript. It opens at the end and follows new content while
|
|
3
|
+
* the reader is there; a turn the person sends settles near the top with the
|
|
4
|
+
* reply growing under it; and the reader's place holds when older messages
|
|
5
|
+
* load above. It fills a parent with a bounded height.
|
|
6
|
+
*/export function MessageScroller({children,...rest}){const[store]=useState(()=>new MessageScrollerStore());return/*#__PURE__*/_jsx(StoreContext.Provider,{value:store,children:/*#__PURE__*/_jsx(LazyMotion,{features:domAnimation,strict:true,children:/*#__PURE__*/_jsx(MotionConfig,{reducedMotion:"user",children:/*#__PURE__*/_jsx("div",{...rest,"data-slot":"message-scroller",...props(styles.root),children:children})})})});}// Base UI sizes the content to fit its widest row; a transcript wraps
|
|
7
|
+
// instead, so its minimum width is cleared as Scroll Area does.
|
|
8
|
+
const scrolled=props(scrollAreaStyles.content,styles.scrollContent);const contentProps={...scrolled,style:{...scrolled.style,minWidth:0}};/**
|
|
9
|
+
* The scrolling region, a Scroll Area: a thin thumb shows on hover and
|
|
10
|
+
* while scrolling, and the edges fade where more waits. It is focusable,
|
|
11
|
+
* so the keyboard can scroll it.
|
|
12
|
+
*/export function MessageScrollerViewport({"aria-label":ariaLabel="Messages",children,...rest}){const{attachViewport}=useStore();return/*#__PURE__*/_jsxs(BaseScrollArea.Root,{...props(scrollAreaStyles.root,styles.area),children:[/*#__PURE__*/_jsx(BaseScrollArea.Viewport,{...rest,"aria-label":ariaLabel,"data-slot":"message-scroller-viewport",ref:attachViewport,role:"region",tabIndex:0,...props(scrollAreaStyles.viewport,scrollAreaStyles.viewportFade,styles.viewport),children:/*#__PURE__*/_jsx(BaseScrollArea.Content,{...contentProps,children:children})}),/*#__PURE__*/_jsx(BaseScrollArea.Scrollbar,{orientation:"vertical",...props(scrollAreaStyles.scrollbar,scrollAreaStyles.scrollbarVertical),children:/*#__PURE__*/_jsx(BaseScrollArea.Thumb,{...props(scrollAreaStyles.thumb)})})]});}/**
|
|
13
|
+
* The transcript itself, a live log that announces new turns. Every direct
|
|
14
|
+
* child is a MessageScrollerItem.
|
|
15
|
+
*/export function MessageScrollerContent({busy=false,children,...rest}){const{attachLog,attachSpacer}=useStore();return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx("div",{...rest,"aria-busy":busy||undefined,"aria-relevant":"additions","data-slot":"message-scroller-content",ref:attachLog,role:"log",...props(styles.content),children:children}),/*#__PURE__*/_jsx("div",{"aria-hidden":"true",ref:attachSpacer})]});}// A new row fades in and rises 8px: duration.overlayEnter with
|
|
16
|
+
// easing.expoOut. Rows from the first load stay still.
|
|
17
|
+
const ARRIVAL={animate:{opacity:1,y:0},initial:{opacity:0,y:8},transition:{duration:0.28,ease:[0.16,1,0.3,1]}};export function MessageScrollerItem({children,messageId,scrollAnchor=false,...rest}){const{isLive}=useStore();// Decided once, when the row first renders.
|
|
18
|
+
const[arriving]=useState(isLive);return/*#__PURE__*/_jsx("div",{...rest,"data-message-id":messageId,"data-scroll-anchor":String(scrollAnchor),"data-slot":"message-scroller-item",children:/*#__PURE__*/_jsx(m.div,{animate:ARRIVAL.animate,initial:arriving?ARRIVAL.initial:false,transition:ARRIVAL.transition,children:children})});}/**
|
|
19
|
+
* A round arrow that jumps to the newest content. It fades in when there is
|
|
20
|
+
* something below the view and leaves the tab order when there is not.
|
|
21
|
+
*/export function MessageScrollerButton({"aria-label":ariaLabel="Jump to latest",...rest}){const store=useStore();const{atEnd}=useMessageScrollerState();const jump=useCallback(()=>store.scrollToEnd(),[store]);return/*#__PURE__*/_jsx("button",{...rest,"aria-label":ariaLabel,"data-active":atEnd?undefined:"","data-slot":"message-scroller-button",inert:atEnd,onClick:jump,type:"button",...props(buttonStyles.base,buttonStyles["icon-sm"],buttonStyles.press,buttonStyles.interactionGhost,styles.button),children:/*#__PURE__*/_jsx(IconArrowDown,{"aria-hidden":"true",size:16})});}// How far a tick is from the one in focus, for its length: the focused
|
|
22
|
+
// tick is full length and its neighbors step down, like a dock.
|
|
23
|
+
function nearness(index,focus){return String(Math.min(Math.abs(index-focus),3));}function NavigationTick({anchor,current,handle,index,near,onFocusTick,onLeaveTick,total}){const{scrollToMessage}=useStore();const jump=useCallback(()=>scrollToMessage(anchor.id),[anchor.id,scrollToMessage]);const focusTick=useCallback(()=>onFocusTick(index),[index,onFocusTick]);return/*#__PURE__*/_jsx("li",{children:/*#__PURE__*/_jsx(TooltipTrigger,{delay:0,handle:handle,payload:anchor,render:/*#__PURE__*/_jsx("button",{"aria-current":current?"true":undefined,"aria-label":`Turn ${index+1} of ${total}: ${anchor.label}`,"data-near":near,onBlur:onLeaveTick,onClick:jump,onFocus:focusTick,onPointerEnter:focusTick,onPointerLeave:onLeaveTick,type:"button",...props(styles.tick)}),children:/*#__PURE__*/_jsx("span",{"aria-hidden":"true",...props(styles.tickLine)})})});}// A tooltip surface that shows and moves at once: the rail's ticks carry
|
|
24
|
+
// the motion, so the preview only follows them.
|
|
25
|
+
function NavigationPreview({payload}){return/*#__PURE__*/_jsx(TooltipPrimitive.Portal,{children:/*#__PURE__*/_jsx(TooltipPrimitive.Positioner,{side:"left",sideOffset:8,...props(tooltipStyles.positioner,styles.still),children:/*#__PURE__*/_jsx(TooltipPrimitive.Popup,{"data-slot":"tooltip-popup",...props(tooltipStyles.popup,styles.still),children:payload?/*#__PURE__*/_jsxs("span",{...props(styles.preview),children:[/*#__PURE__*/_jsx("span",{...props(styles.previewTitle),children:payload.label}),payload.reply?/*#__PURE__*/_jsx("span",{...props(styles.previewReply),children:payload.reply}):null]}):null})})});}/**
|
|
26
|
+
* A rail of ticks along the end edge, one per turn boundary. Hover or focus
|
|
27
|
+
* a tick to preview the turn and the start of its reply; press it to jump
|
|
28
|
+
* there. It shows from two turns, and floats over the nearest positioned
|
|
29
|
+
* box, so keep the thread's end edge clear of it.
|
|
30
|
+
*/export function MessageScrollerNavigation({"aria-label":ariaLabel="Turns"}){const{anchors,current}=useMessageScrollerState();const[handle]=useState(()=>TooltipCreateHandle());const[pointed,setPointed]=useState(null);const leave=useCallback(()=>setPointed(null),[]);if(anchors.length<2){return null;}const focus=pointed??Math.max(0,anchors.findIndex(anchor=>anchor.id===current));return/*#__PURE__*/_jsxs("nav",{"aria-label":ariaLabel,"data-slot":"message-scroller-navigation",...props(styles.navigation),children:[/*#__PURE__*/_jsx("ol",{...props(styles.ticks),children:anchors.map((anchor,index)=>/*#__PURE__*/_jsx(NavigationTick,{anchor:anchor,current:anchor.id===current,handle:handle,index:index,near:nearness(index,focus),onFocusTick:setPointed,onLeaveTick:leave,total:anchors.length},anchor.id))}),/*#__PURE__*/_jsx(Tooltip,{handle:handle,children:({payload})=>/*#__PURE__*/_jsx(NavigationPreview,{payload:payload})})]});}
|
|
@@ -0,0 +1,4 @@
|
|
|
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/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{fontWeight}from"../../styles/typography.stylex";// Rail ticks: 12px apart, each a 1px line up to 16px long. The rows are
|
|
2
|
+
// below the 24px control height on purpose: scrolling reaches every turn
|
|
3
|
+
// too, which WCAG 2.5.8 accepts as an equivalent.
|
|
4
|
+
const TICK_ROW=space["3"];export const messageScrollerStyles={area:{kzQI83:"x1iyjqo2",kAzted:"x2lwn1j",k7Eaqz:"xeuugli",$$css:true},button:{kWkggS:"xui3q9s",kVAM5u:"x155xxfk",kT0f0o:"x3hdh8v",kVL7Gh:"xr0m5pc",kfmiAY:"x9okykr",krdFHd:"x1142k65",ksu8eU:"x1y0btm7",kMzoRj:"x1cdonsl",kGVxlE:"x1mhlhek",krVfgx:"xnao3ae",kLqNvP:"xbudbmw",kSiTet:"xgq25al xg01cxk",kVAEAm:"x10l6tqk",k3aq6I:"x163x5zs xw26y1g",kIyJzY:"x1e471i8 x1j5v3x2",k1ekBW:"x6o7n8i",kAMwcw:"xvhdtae",kY2c9j:"x1vjfegm",$$css:true},content:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"xhg8sq8 xiw8qbs",$$css:true},navigation:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kYYq5F:"x1ixy539",kt4wiu:"x1etwluz",kjj79g:"xl56j7k",kVAEAm:"x10l6tqk",kY2c9j:"x1vjfegm",$$css:true},preview:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x13hh4mm",kzqmXN:"x1e67fm3",ks0D6T:"x193iq5w",k8WAf4:"x391bbb",kg3NbH:"xy7odpl",$$css:true},previewReply:{kMwMTN:"x125omll",k1xSpc:"x104kibb",kVQacm:"xb3r6kr",kgKLqz:"x1ua5tub",kJFfOR:"x1h7i4cw",$$css:true},previewTitle:{kMwMTN:"x14tvo57",k63SB2:"xuku2lm",kVQacm:"xb3r6kr",kg5iWk:"xlyipyv",khDVqt:"xuxw1ft",$$css:true},root:{kZKoxP:"x5yr21d",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kAzted:"x2lwn1j",k7Eaqz:"xeuugli",kVAEAm:"x1n2onr6",$$css:true},scrollContent:{kAzted:"x1us19tq",$$css:true},still:{kIyJzY:"x1meeygq",$$css:true},tick:{kGNEyG:"x6s0dn4",kysU6D:"xjyslct",kWkggS:"xjbqb8w",kZKoxP:"x18gu5k8",kaIpWk:"xvozwe9",kMzoRj:"xc342km",kkrTdU:"x1ypdohk",k1xSpc:"x78zum5",kzqmXN:"xdr7e86",kjj79g:"x13a6bvl",kjBf7l:"x4dprnk x1uczgqu",kInvED:"x11r2kya",k3XXqK:"x9v5kkp x1t137rt",kMeerF:"x1vhx2qj",kmVPX3:"x1717udv",kwRFfy:"x1a7jdvm",$$css:true},tickLine:{kWkggS:"x1jnmv27 x1gj4qyj x1cbth52 x1qcn63x",kZKoxP:"xjm9jq1",kzqmXN:"xneo5a6",k3aq6I:"xqbm92i x1me81ie x1izzkki x1bdb094",k3nNDw:"xee5nap",kIyJzY:"x1e471i8 x115jf8",k1ekBW:"x18dpk69",kAMwcw:"xvhdtae",$$css:true},ticks:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kB88ic:"xe8uvvx",kogj98:"x1ghz6dp",kskxy:"xmz0i5r",kORKVm:"x1odjw0f",kmVPX3:"x1717udv",k5wCbM:"x1rohswg",$$css:true},viewport:{kjBf7l:"x4dprnk x1uczgqu",kInvED:"x11r2kya",k3XXqK:"x9v5kkp x1t137rt",kMeerF:"x1vhx2qj",kSOgLn:"x1xzczws",kacamN:"x1e4zzel",$$css:true}};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Meter as BaseMeter } from "@base-ui/react/meter";
|
|
2
|
+
import type { ComponentPropsWithRef } from "react";
|
|
3
|
+
import type { Closed } from "../../closed";
|
|
4
|
+
type RootProps = ComponentPropsWithRef<typeof BaseMeter.Root>;
|
|
5
|
+
type TrackProps = ComponentPropsWithRef<typeof BaseMeter.Track>;
|
|
6
|
+
type IndicatorProps = ComponentPropsWithRef<typeof BaseMeter.Indicator>;
|
|
7
|
+
type LabelProps = ComponentPropsWithRef<typeof BaseMeter.Label>;
|
|
8
|
+
type ValueProps = ComponentPropsWithRef<typeof BaseMeter.Value>;
|
|
9
|
+
type Part<T> = Omit<Closed<T>, "data-slot" | "role">;
|
|
10
|
+
export type MeterProps = Omit<Part<RootProps>, "aria-valuemax" | "aria-valuemin" | "aria-valuenow"> & {
|
|
11
|
+
ref?: RootProps["ref"];
|
|
12
|
+
};
|
|
13
|
+
export type MeterTrackProps = Part<TrackProps> & {
|
|
14
|
+
ref?: TrackProps["ref"];
|
|
15
|
+
};
|
|
16
|
+
export type MeterIndicatorProps = Part<IndicatorProps> & {
|
|
17
|
+
ref?: IndicatorProps["ref"];
|
|
18
|
+
};
|
|
19
|
+
export type MeterLabelProps = Part<LabelProps> & {
|
|
20
|
+
ref?: LabelProps["ref"];
|
|
21
|
+
};
|
|
22
|
+
export type MeterValueProps = Part<ValueProps> & {
|
|
23
|
+
ref?: ValueProps["ref"];
|
|
24
|
+
};
|
|
25
|
+
export declare function Meter({ children, locale, max, min, ref: forwardedRef, render, value, ...rest }: MeterProps): import("react").JSX.Element;
|
|
26
|
+
export declare function MeterTrack({ children, ref: forwardedRef, render, ...rest }: MeterTrackProps): import("react").JSX.Element;
|
|
27
|
+
export declare function MeterIndicator({ children, ref: forwardedRef, render, ...rest }: MeterIndicatorProps): import("react").JSX.Element;
|
|
28
|
+
export declare function MeterLabel({ children, ref: forwardedRef, render, ...rest }: MeterLabelProps): import("react").JSX.Element;
|
|
29
|
+
export declare function MeterValue({ children, ref: forwardedRef, render, ...rest }: MeterValueProps): import("react").JSX.Element;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";import{Meter as BaseMeter}from"@base-ui/react/meter";import{props}from"@stylexjs/stylex";import{protectRenderSlot}from"../../render-utils";import{typeRoles}from"../../styles/typography.styles";import{meterStyles}from"./meter.styles";import{jsx as _jsx}from"react/jsx-runtime";function stripReservedProps(rest){for(const name of["className","data-slot","role","style"]){Reflect.deleteProperty(rest,name);}}function stripRangeProps(rest){for(const name of["aria-valuemax","aria-valuemin","aria-valuenow"]){Reflect.deleteProperty(rest,name);}}function validateRange(value,min,max){if(!(Number.isFinite(value)&&Number.isFinite(min)&&Number.isFinite(max))){throw new TypeError("Meter value, min, and max must be finite numbers.");}if(min>=max){throw new RangeError("Meter min must be less than max.");}}// Without children there is no MeterLabel, so the root must carry the name.
|
|
2
|
+
function validateName(rest,hasChildren){const name=rest["aria-label"]??rest["aria-labelledby"]??"";if(!(hasChildren||name.trim())){throw new TypeError("Meter requires a MeterLabel child, aria-label, or aria-labelledby.");}}export function Meter({children,locale="en",max=100,min=0,ref:forwardedRef,render,value,...rest}){stripReservedProps(rest);stripRangeProps(rest);validateRange(value,min,max);validateName(rest,children!==undefined);return/*#__PURE__*/_jsx(BaseMeter.Root,{...rest,"data-slot":"meter",locale:locale,max:max,min:min,ref:forwardedRef,render:protectRenderSlot("meter",render,{role:"meter"}),value:value,...props(meterStyles.root,typeRoles.body),children:children??/*#__PURE__*/_jsx(MeterTrack,{children:/*#__PURE__*/_jsx(MeterIndicator,{})})});}export function MeterTrack({children,ref:forwardedRef,render,...rest}){stripReservedProps(rest);return/*#__PURE__*/_jsx(BaseMeter.Track,{...rest,"data-slot":"meter-track",ref:forwardedRef,render:protectRenderSlot("meter-track",render),...props(meterStyles.track),children:children});}export function MeterIndicator({children,ref:forwardedRef,render,...rest}){stripReservedProps(rest);return/*#__PURE__*/_jsx(BaseMeter.Indicator,{...rest,"data-slot":"meter-indicator",ref:forwardedRef,render:protectRenderSlot("meter-indicator",render),...props(meterStyles.indicator),children:children});}export function MeterLabel({children,ref:forwardedRef,render,...rest}){stripReservedProps(rest);return/*#__PURE__*/_jsx(BaseMeter.Label,{...rest,"data-slot":"meter-label",ref:forwardedRef,render:protectRenderSlot("meter-label",render),...props(meterStyles.label),children:children});}export function MeterValue({children,ref:forwardedRef,render,...rest}){stripReservedProps(rest);return/*#__PURE__*/_jsx(BaseMeter.Value,{...rest,"data-slot":"meter-value",ref:forwardedRef,render:protectRenderSlot("meter-value",render),...props(meterStyles.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/motion.stylex";import{duration,easing}from"../../styles/motion.stylex";import"../../styles/spacing.stylex";import{space}from"../../styles/spacing.stylex";import"../../styles/typography.stylex";import{fontWeight}from"../../styles/typography.stylex";export const meterStyles={indicator:{kWkggS:"x1bdoiv7",kaIpWk:"x10hpsqq",kB7OPa:"x9f619",k1xSpc:"x1lliihq",kZKoxP:"x3igimt",kIyJzY:"x1e471i8 x115jf8",k1ekBW:"xxrbq2n",kAMwcw:"xvhdtae",$$css:true},label:{kMwMTN:"x14tvo57",k63SB2:"xuku2lm",$$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:"x164u9eo",kVQacm:"xb3r6kr",kVAEAm:"x1n2onr6",kzqmXN:"xh8yej3",$$css:true},value:{kMwMTN:"x14tvo57",kcqcaj:"xss6m8b",$$css:true}};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
export type MetricProps = Omit<ComponentPropsWithRef<"div">, "className" | "data-slot" | "style">;
|
|
3
|
+
export type MetricLabelProps = Omit<ComponentPropsWithRef<"div">, "className" | "data-slot" | "style">;
|
|
4
|
+
export type MetricValueProps = Omit<ComponentPropsWithRef<"div">, "className" | "data-slot" | "style">;
|
|
5
|
+
export type MetricDescriptionProps = Omit<ComponentPropsWithRef<"div">, "className" | "data-slot" | "style">;
|
|
6
|
+
export declare function Metric({ children, ref: forwardedRef, ...rest }: MetricProps): import("react").JSX.Element;
|
|
7
|
+
export declare function MetricLabel({ children, ref: forwardedRef, ...rest }: MetricLabelProps): import("react").JSX.Element;
|
|
8
|
+
export declare function MetricValue({ children, ref: forwardedRef, ...rest }: MetricValueProps): import("react").JSX.Element;
|
|
9
|
+
export declare function MetricDescription({ children, ref: forwardedRef, ...rest }: MetricDescriptionProps): import("react").JSX.Element;
|
|
10
|
+
export type MetricDeltaProps = Omit<ComponentPropsWithRef<"span">, "children" | "className" | "data-slot" | "style"> & {
|
|
11
|
+
/** Which direction is good: "up" by default, "down" for costs or errors. */
|
|
12
|
+
good?: "down" | "up";
|
|
13
|
+
locale?: string;
|
|
14
|
+
/** Fractional change: 0.16 renders "+16%". */
|
|
15
|
+
value: number;
|
|
16
|
+
};
|
|
17
|
+
export declare function MetricDelta({ good, locale, value, ...rest }: MetricDeltaProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{props}from"@stylexjs/stylex";import{typeRoles}from"../../styles/typography.styles";import{metricStyles}from"./metric.styles";import{jsx as _jsx}from"react/jsx-runtime";export function Metric({children,ref:forwardedRef,...rest}){return/*#__PURE__*/_jsx("div",{...rest,"data-slot":"metric",ref:forwardedRef,...props(metricStyles.root),children:children});}export function MetricLabel({children,ref:forwardedRef,...rest}){return/*#__PURE__*/_jsx("div",{...rest,"data-slot":"metric-label",ref:forwardedRef,...props(metricStyles.label),children:children});}export function MetricValue({children,ref:forwardedRef,...rest}){return/*#__PURE__*/_jsx("div",{...rest,"data-slot":"metric-value",ref:forwardedRef,...props(metricStyles.value,typeRoles.numeric),children:children});}export function MetricDescription({children,ref:forwardedRef,...rest}){return/*#__PURE__*/_jsx("div",{...rest,"data-slot":"metric-description",ref:forwardedRef,...props(metricStyles.description),children:children});}// Keyed by direction relative to the good direction: worse, flat, better.
|
|
2
|
+
const deltaTones={"-1":metricStyles.deltaWorse,"0":metricStyles.deltaFlat,"1":metricStyles.deltaBetter};// A compact change chip. The sign carries the direction; the tint says whether
|
|
3
|
+
// that direction is good.
|
|
4
|
+
export function MetricDelta({good="up",locale="en-US",value,...rest}){const direction=Math.sign(value);const tone=good==="up"?direction:-direction;for(const name of["className","data-slot","style"]){Reflect.deleteProperty(rest,name);}return/*#__PURE__*/_jsx("span",{...rest,"data-slot":"metric-delta",...props(typeRoles.label,metricStyles.delta,deltaTones[tone]),children:new Intl.NumberFormat(locale,{maximumFractionDigits:1,signDisplay:"exceptZero",style:"percent"}).format(value)});}
|
|
@@ -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{fontSize,fontWeight,lineHeight}from"../../styles/typography.stylex";export const metricStyles={delta:{kaIpWk:"xvozwe9",k1xSpc:"x3nfvp2",kmuXW:"x2lah0s",kcqcaj:"xss6m8b",k8WAf4:"x48vkq2",kg3NbH:"xwf2n6",khDVqt:"xuxw1ft",kzqmXN:"xeq5yr9",$$css:true},deltaBetter:{kWkggS:"x80umms",kMwMTN:"x19d0d4p",$$css:true},deltaFlat:{kWkggS:"x1vs9wzj",kMwMTN:"x125omll",$$css:true},deltaWorse:{kWkggS:"xyio8l9",kMwMTN:"x1ytrddi",$$css:true},description:{kMwMTN:"x125omll",kGuDYH:"xlh8hku",k63SB2:"x1lo1l87",kLWn49:"x2xzzt7",kogj98:"x1ghz6dp",k7Eaqz:"xeuugli",kHjlTd:"x1mzt3pk",$$css:true},label:{kMwMTN:"x125omll",kGuDYH:"xlh8hku",k63SB2:"xuku2lm",kLWn49:"x2xzzt7",kogj98:"x1ghz6dp",k7Eaqz:"xeuugli",kHjlTd:"x1mzt3pk",$$css:true},root:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x13hh4mm",kogj98:"x1ghz6dp",k7Eaqz:"xeuugli",$$css:true},value:{kMwMTN:"x14tvo57",kogj98:"x1ghz6dp",k7Eaqz:"xeuugli",kHjlTd:"xj0a0fe",$$css:true}};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef, ReactNode } from "react";
|
|
2
|
+
import type { Closed } from "../../closed";
|
|
3
|
+
export type MetricTrendProps = Omit<Closed<ComponentPropsWithRef<"div">>, "children" | "data-slot" | "role"> & {
|
|
4
|
+
/** Top-right controls such as a ChartLegend or a period switcher. */
|
|
5
|
+
actions?: ReactNode;
|
|
6
|
+
/** The chart, usually a TimeSeries or CategoryComparison. Omit for a stat card. */
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
/** A MetricDelta beside the value. */
|
|
9
|
+
delta?: ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Where the change sits. "footer" moves the description and delta into an
|
|
12
|
+
* inset strip at the bottom of the card.
|
|
13
|
+
*/
|
|
14
|
+
deltaPlacement?: "footer" | "value";
|
|
15
|
+
description?: ReactNode;
|
|
16
|
+
/** A glyph shown in a small brand tile before the label. */
|
|
17
|
+
icon?: ReactNode;
|
|
18
|
+
label: ReactNode;
|
|
19
|
+
/** The headline number. Omit it when the chart is the headline, such as rings. */
|
|
20
|
+
value?: ReactNode;
|
|
21
|
+
/** A currency sign or unit before the value, set smaller and muted: "$". */
|
|
22
|
+
valuePrefix?: string;
|
|
23
|
+
/** A unit after the value, set smaller and muted: "h", "ms", "%". */
|
|
24
|
+
valueSuffix?: string;
|
|
25
|
+
};
|
|
26
|
+
export declare function MetricTrend({ actions, children, delta, deltaPlacement, description, icon, label, ref: forwardedRef, value, valuePrefix, valueSuffix, ...rest }: MetricTrendProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{props}from"@stylexjs/stylex";import{Metric,MetricDescription,MetricLabel,MetricValue}from"../metric/metric";import{metricTrendStyles}from"./metric-trend.styles";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";// The numeral leads; currency signs and units step back so the number reads
|
|
2
|
+
// first.
|
|
3
|
+
function HeadlineValue({value,valuePrefix,valueSuffix}){return/*#__PURE__*/_jsxs(MetricValue,{children:[valuePrefix?/*#__PURE__*/_jsx("span",{...props(metricTrendStyles.unit,metricTrendStyles.prefix),children:valuePrefix}):null,value,valueSuffix?/*#__PURE__*/_jsx("span",{...props(metricTrendStyles.unit,metricTrendStyles.suffix),children:valueSuffix}):null]});}function MetricTrendFooter({delta,description}){return/*#__PURE__*/_jsxs("div",{"data-slot":"metric-trend-footer",...props(metricTrendStyles.footer),children:[description===undefined||description===null?/*#__PURE__*/_jsx("span",{}):/*#__PURE__*/_jsx(MetricDescription,{children:description}),delta]});}// A metric card: label, value with an optional change chip, a comparison line,
|
|
4
|
+
// optional actions, and an optional chart below. Without a chart it is a stat
|
|
5
|
+
// card.
|
|
6
|
+
function MetricTrendLead({delta,description,icon,label,value,valuePrefix,valueSuffix}){return/*#__PURE__*/_jsx("div",{...props(metricTrendStyles.lead),children:/*#__PURE__*/_jsxs(Metric,{children:[/*#__PURE__*/_jsx(MetricLabel,{children:icon?/*#__PURE__*/_jsxs("span",{...props(metricTrendStyles.labelRow),children:[/*#__PURE__*/_jsx("span",{"aria-hidden":"true","data-slot":"metric-trend-icon",...props(metricTrendStyles.icon),children:icon}),label]}):label}),value===undefined||value===null?null:/*#__PURE__*/_jsxs("div",{...props(metricTrendStyles.valueRow),children:[/*#__PURE__*/_jsx(HeadlineValue,{value:value,valuePrefix:valuePrefix,valueSuffix:valueSuffix}),delta]}),description===undefined||description===null?null:/*#__PURE__*/_jsx(MetricDescription,{children:description})]})});}export function MetricTrend({actions,children,delta,deltaPlacement="value",description,icon,label,ref:forwardedRef,value,valuePrefix,valueSuffix,...rest}){for(const name of["className","data-slot","role","style"]){Reflect.deleteProperty(rest,name);}const inFooter=deltaPlacement==="footer";return/*#__PURE__*/_jsxs("div",{...rest,"data-slot":"metric-trend",ref:forwardedRef,...props(metricTrendStyles.root),children:[/*#__PURE__*/_jsxs("div",{"data-slot":"metric-trend-header",...props(metricTrendStyles.header),children:[/*#__PURE__*/_jsx(MetricTrendLead,{delta:inFooter?undefined:delta,description:inFooter?undefined:description,icon:icon,label:label,value:value,valuePrefix:valuePrefix,valueSuffix:valueSuffix}),actions?/*#__PURE__*/_jsx("div",{"data-slot":"metric-trend-actions",...props(metricTrendStyles.actions),children:actions}):null]}),children,inFooter?/*#__PURE__*/_jsx(MetricTrendFooter,{delta:delta,description:description}):null]});}
|
|
@@ -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,glyphSize}from"../../styles/dimensions.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 metricTrendStyles={actions:{kGNEyG:"x6s0dn4",k1xSpc:"x78zum5",kmuXW:"x2lah0s",kwnvtZ:"x1a02dak",kOIVth:"xp4ho6d",$$css:true},footer:{kGNEyG:"x6s0dn4",kWkggS:"xwn18cz",kaIpWk:"x42tf2m",k1xSpc:"x78zum5",kOIVth:"xiw8qbs",kjj79g:"x1qughib",k1K539:"x1p40rmo",keoZOQ:"xr1yuqi",kUOVxO:"x1tjh6xj",k7Eaqz:"xeuugli",k8WAf4:"x391bbb",kg3NbH:"xy7odpl",$$css:true},header:{kGNEyG:"x1cy8zhl",k1xSpc:"x78zum5",kwnvtZ:"x1a02dak",kOIVth:"xiw8qbs",kjj79g:"x1qughib",k7Eaqz:"xeuugli",$$css:true},icon:{kGNEyG:"x6s0dn4",kWkggS:"x16d8uok",kaIpWk:"xvozwe9",kMwMTN:"xdnyjpo",k1xSpc:"x3nfvp2",kmuXW:"x2lah0s",kZKoxP:"x11huzal xud2w1",kjj79g:"xl56j7k",kzqmXN:"x12etf84 x1sxroq0",$$css:true},labelRow:{kGNEyG:"x6s0dn4",k1xSpc:"x3nfvp2",kOIVth:"xp4ho6d",k7Eaqz:"xeuugli",$$css:true},lead:{kGNEyG:"x1cy8zhl",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"xiw8qbs",k7Eaqz:"xeuugli",$$css:true},prefix:{k71WvV:"x1x32cvg",$$css:true},root:{kWkggS:"xu84zt7",kaIpWk:"x1jw0md8",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"xfy154a",k7Eaqz:"xeuugli",k8WAf4:"x7bohs8",kg3NbH:"xaqi9fd",$$css:true},suffix:{keTefX:"xfu946g",$$css:true},unit:{kMwMTN:"x125omll",kGuDYH:"x2jk2ty x12ama9c",k63SB2:"xuku2lm",kLWn49:"xf8w09u x1rn0pvf",$$css:true},valueRow:{kGNEyG:"x6s0dn4",k1xSpc:"x78zum5",kwnvtZ:"x1a02dak",kOIVth:"xp4ho6d",k7Eaqz:"xeuugli",$$css:true}};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { NavigationMenu as BaseNavigationMenu } from "@base-ui/react/navigation-menu";
|
|
2
|
+
import type { ComponentPropsWithRef, ReactNode } from "react";
|
|
3
|
+
import type { Closed } from "../../closed";
|
|
4
|
+
type Part<T> = Omit<Closed<T>, "data-slot" | "render" | "role">;
|
|
5
|
+
type BaseRootProps = ComponentPropsWithRef<typeof BaseNavigationMenu.Root>;
|
|
6
|
+
type BaseListProps = ComponentPropsWithRef<typeof BaseNavigationMenu.List>;
|
|
7
|
+
type BaseItemProps = ComponentPropsWithRef<typeof BaseNavigationMenu.Item>;
|
|
8
|
+
type BaseTriggerProps = ComponentPropsWithRef<typeof BaseNavigationMenu.Trigger>;
|
|
9
|
+
type BaseContentProps = ComponentPropsWithRef<typeof BaseNavigationMenu.Content>;
|
|
10
|
+
type BaseLinkProps = ComponentPropsWithRef<typeof BaseNavigationMenu.Link>;
|
|
11
|
+
type BasePortalProps = Closed<ComponentPropsWithRef<typeof BaseNavigationMenu.Portal>>;
|
|
12
|
+
type BasePositionerProps = ComponentPropsWithRef<typeof BaseNavigationMenu.Positioner>;
|
|
13
|
+
type BasePopupProps = ComponentPropsWithRef<typeof BaseNavigationMenu.Popup>;
|
|
14
|
+
export type NavigationMenuProps = Omit<Part<BaseRootProps>, "aria-label" | "orientation"> & {
|
|
15
|
+
"aria-label"?: string;
|
|
16
|
+
};
|
|
17
|
+
export type NavigationMenuListProps = Part<BaseListProps>;
|
|
18
|
+
export type NavigationMenuItemProps = Part<BaseItemProps>;
|
|
19
|
+
export type NavigationMenuTriggerProps = Omit<Closed<BaseTriggerProps>, "data-slot" | "role">;
|
|
20
|
+
export type NavigationMenuContentProps = Omit<Closed<BaseContentProps>, "data-slot" | "role">;
|
|
21
|
+
export type NavigationMenuLinkProps = Omit<Closed<BaseLinkProps>, "data-slot" | "role"> & {
|
|
22
|
+
/** One line under the label, for links in a menu panel. */
|
|
23
|
+
description?: ReactNode;
|
|
24
|
+
};
|
|
25
|
+
export type NavigationMenuPopupProps = Omit<Part<BasePopupProps>, "children"> & {
|
|
26
|
+
align?: BasePositionerProps["align"];
|
|
27
|
+
alignOffset?: BasePositionerProps["alignOffset"];
|
|
28
|
+
collisionPadding?: BasePositionerProps["collisionPadding"];
|
|
29
|
+
portalProps?: Omit<Part<BasePortalProps>, "children">;
|
|
30
|
+
side?: BasePositionerProps["side"];
|
|
31
|
+
sideOffset?: BasePositionerProps["sideOffset"];
|
|
32
|
+
};
|
|
33
|
+
export declare function NavigationMenu({ "aria-label": ariaLabel, ref: forwardedRef, ...rest }: NavigationMenuProps): import("react").JSX.Element;
|
|
34
|
+
export declare function NavigationMenuList({ ref: forwardedRef, ...rest }: NavigationMenuListProps): import("react").JSX.Element;
|
|
35
|
+
export declare function NavigationMenuItem({ ref: forwardedRef, ...rest }: NavigationMenuItemProps): import("react").JSX.Element;
|
|
36
|
+
export declare function NavigationMenuTrigger({ children, disabled, ref: forwardedRef, render, type, ...rest }: NavigationMenuTriggerProps): import("react").JSX.Element;
|
|
37
|
+
export declare function NavigationMenuContent({ ref: forwardedRef, render, ...rest }: NavigationMenuContentProps): import("react").JSX.Element;
|
|
38
|
+
export declare function NavigationMenuLink({ children, description, active, ref: forwardedRef, render, ...rest }: NavigationMenuLinkProps): import("react").JSX.Element;
|
|
39
|
+
export declare function NavigationMenuPopup({ align, alignOffset, collisionPadding, portalProps, ref: forwardedRef, side, sideOffset, ...rest }: NavigationMenuPopupProps): import("react").JSX.Element;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{NavigationMenu as BaseNavigationMenu}from"@base-ui/react/navigation-menu";import{props}from"@stylexjs/stylex";import{controlLabel}from"../../control-label";import{IconChevronDown}from"../../icons";import{protectRenderSlot}from"../../render-utils";import{popoverStyles}from"../popover/popover.styles";import{navigationMenuStyles}from"./navigation-menu.styles";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";function stripProtectedProps(rest){for(const name of["className","data-slot","render","role","style"]){Reflect.deleteProperty(rest,name);}}function ChevronDown(){return/*#__PURE__*/_jsx(IconChevronDown,{"aria-hidden":"true",focusable:"false",size:"1rem"});}export function NavigationMenu({"aria-label":ariaLabel="Navigation",ref:forwardedRef,...rest}){stripProtectedProps(rest);Reflect.deleteProperty(rest,"orientation");return/*#__PURE__*/_jsx(BaseNavigationMenu.Root,{...rest,"aria-label":ariaLabel,"data-slot":"navigation-menu",orientation:"horizontal",ref:forwardedRef,...props(navigationMenuStyles.root)});}export function NavigationMenuList({ref:forwardedRef,...rest}){stripProtectedProps(rest);return/*#__PURE__*/_jsx(BaseNavigationMenu.List,{...rest,"data-slot":"navigation-menu-list",ref:forwardedRef,...props(navigationMenuStyles.list)});}export function NavigationMenuItem({ref:forwardedRef,...rest}){stripProtectedProps(rest);return/*#__PURE__*/_jsx(BaseNavigationMenu.Item,{...rest,"data-slot":"navigation-menu-item",ref:forwardedRef,...props(navigationMenuStyles.item)});}export function NavigationMenuTrigger({children,disabled,ref:forwardedRef,render,type,...rest}){stripProtectedProps(rest);const triggerStyles=props(navigationMenuStyles.link,navigationMenuStyles.trigger,!disabled&&navigationMenuStyles.interactive);return/*#__PURE__*/_jsxs(BaseNavigationMenu.Trigger,{...rest,"data-slot":"navigation-menu-trigger",disabled:disabled,ref:forwardedRef,render:protectRenderSlot("navigation-menu-trigger",render),type:render?type:type??"button",...triggerStyles,children:[controlLabel(children),/*#__PURE__*/_jsx(BaseNavigationMenu.Icon,{"data-slot":"navigation-menu-icon",...props(navigationMenuStyles.icon),children:/*#__PURE__*/_jsx(ChevronDown,{})})]});}export function NavigationMenuContent({ref:forwardedRef,render,...rest}){stripProtectedProps(rest);const contentStyles=props(navigationMenuStyles.content);return/*#__PURE__*/_jsx(BaseNavigationMenu.Content,{...rest,"data-slot":"navigation-menu-content",ref:forwardedRef,render:protectRenderSlot("navigation-menu-content",render),...contentStyles});}export function NavigationMenuLink({children,description,active,ref:forwardedRef,render,...rest}){stripProtectedProps(rest);const linkStyles=props(navigationMenuStyles.link,navigationMenuStyles.interactive,description!==undefined&&navigationMenuStyles.linkWithDescription,active&&navigationMenuStyles.active);return/*#__PURE__*/_jsx(BaseNavigationMenu.Link,{...rest,active:active,"aria-current":active?"page":undefined,"data-slot":"navigation-menu-link",ref:forwardedRef,render:protectRenderSlot("navigation-menu-link",render,{"aria-current":active?"page":undefined}),...linkStyles,children:description===undefined?controlLabel(children):/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx("span",{...props(navigationMenuStyles.linkTitle),children:children}),/*#__PURE__*/_jsx("span",{...props(navigationMenuStyles.linkDescription),children:description})]})});}export function NavigationMenuPopup({align="start",alignOffset,collisionPadding=12,portalProps,ref:forwardedRef,side="bottom",sideOffset=8,...rest}){const{...safePortalProps}=portalProps??{};stripProtectedProps(rest);stripProtectedProps(safePortalProps);return/*#__PURE__*/_jsx(BaseNavigationMenu.Portal,{...safePortalProps,children:/*#__PURE__*/_jsx(BaseNavigationMenu.Positioner,{align:align,alignOffset:alignOffset,collisionPadding:collisionPadding,side:side,sideOffset:sideOffset,...props(popoverStyles.positioner,navigationMenuStyles.positioner),children:/*#__PURE__*/_jsx(BaseNavigationMenu.Popup,{...rest,"data-slot":"navigation-menu-popup",ref:forwardedRef,...props(popoverStyles.popup,navigationMenuStyles.popup),children:/*#__PURE__*/_jsx(BaseNavigationMenu.Viewport,{"data-slot":"navigation-menu-viewport",...props(navigationMenuStyles.viewport)})})})});}
|
|
@@ -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,focus,focusMotion,focusOutline,opacity}from"../../styles/interaction.stylex";import"../../styles/motion.stylex";import{duration,easing}from"../../styles/motion.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 navigationMenuStyles={active:{kWkggS:"x16d8uok",kMwMTN:"xdnyjpo",$$css:true},content:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kskxy:"x1tv27ko",kSiTet:"xiyypsa x1hw7zpd x1hc1fzr",kORKVm:"x1odjw0f",k3aq6I:"x1wmy1sz xhlwy1x x1c071of",kIyJzY:"x1e471i8 x107nfut x18kz1lc",k1ekBW:"x6o7n8i",kAMwcw:"xvhdtae",$$css:true},icon:{kGNEyG:"x6s0dn4",kMwMTN:"x15rks2t",k1xSpc:"x3nfvp2",kmuXW:"x2lah0s",kZKoxP:"x1l36t39",kjj79g:"xl56j7k",k3aq6I:"x1rc4jnv x1c071of",kIyJzY:"x1e471i8 x1j5v3x2",k1ekBW:"x11xpdln",kAMwcw:"xvhdtae",kzqmXN:"xcdlrvm",$$css:true},interactive:{kWkggS:"x16f8uvd xnau8x9 xf3ijce xjbqb8w",$$css:true},item:{kB88ic:"xe8uvvx",k7Eaqz:"xeuugli",$$css:true},link:{kGNEyG:"x6s0dn4",k44tkh:"x1iha7go",kKVMdj:"x1b5t0b2",kWkggS:"xjbqb8w",kaIpWk:"x2b34ud",kB7OPa:"x9f619",kMwMTN:"x14tvo57",kkrTdU:"x1j1ks5o x1ypdohk",k1xSpc:"x3nfvp2",kmuXW:"xsnv01j",kMv6JI:"xjb2p0i",kGuDYH:"xlh8hku",k63SB2:"x1lo1l87",kOIVth:"x13hh4mm",kZKoxP:"xgaasie",kjj79g:"x1nhvcw1",kLWn49:"x2xzzt7",ks0D6T:"x193iq5w",kAzted:"x1vigsvi",k7Eaqz:"xeuugli",kSiTet:"x1yporm9 x1hc1fzr",kjBf7l:"x4dprnk x1uczgqu",kInvED:"x1w1ofmy",k3XXqK:"x9v5kkp xzc55om",kMeerF:"x1vhx2qj",kHjlTd:"xj0a0fe",k8WAf4:"x1lmimt7",kg3NbH:"xy7odpl",kybGjl:"x1hl2dhg",kIyJzY:"x1e471i8 x1j5v3x2",k1ekBW:"x1k8yt6i",kAMwcw:"xvhdtae",kzqmXN:"xwe2phr",$$css:true},linkDescription:{kMwMTN:"x125omll",kGuDYH:"xlh8hku",kLWn49:"x2xzzt7",$$css:true},linkTitle:{k63SB2:"xuku2lm",$$css:true},linkWithDescription:{kGNEyG:"x1cy8zhl",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"xxhr3t",k8WAf4:"x391bbb",$$css:true},list:{kGNEyG:"x6s0dn4",k1xSpc:"x78zum5",kwnvtZ:"x1a02dak",kOIVth:"x13hh4mm",kB88ic:"xe8uvvx",kqGvvJ:"x10im51j",kUOVxO:"xrxpjvj",k7Eaqz:"xeuugli",k8WAf4:"xt970qd",kg3NbH:"xnjsko4",$$css:true},popup:{kskxy:"x1374xjt",k7Eaqz:"xeuugli",kVQacm:"xb3r6kr",kmVPX3:"xh23c4d",kzqmXN:"xh8yej3",$$css:true},positioner:{ks0D6T:"x1m44ap8",kzqmXN:"xnct8cm",kY2c9j:"xa9119d",$$css:true},root:{ks0D6T:"x193iq5w",k7Eaqz:"xeuugli",kVAEAm:"x1n2onr6",kzqmXN:"xeq5yr9",$$css:true},trigger:{kysU6D:"xjyslct",ksu8eU:"xng3xce",kMzoRj:"xc342km",$$css:true},viewport:{kskxy:"x1374xjt",kVQacm:"xb3r6kr",kzqmXN:"xh8yej3",$$css:true}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext,useContext}from"react";import{IconArrowsHorizontal,IconArrowsVertical,IconMinus,IconPlus}from"../../icons";import{jsx as _jsx}from"react/jsx-runtime";export const NumberFieldContext=createContext({boundField:null,inputId:"",scrubLabelId:"",size:"default"});export function useNumberFieldContext(){return useContext(NumberFieldContext);}export function MinusIcon(){return/*#__PURE__*/_jsx(IconMinus,{"aria-hidden":"true",focusable:"false",size:"16"});}export function PlusIcon(){return/*#__PURE__*/_jsx(IconPlus,{"aria-hidden":"true",focusable:"false",size:"16"});}export function CursorHorizontalIcon(){return/*#__PURE__*/_jsx(IconArrowsHorizontal,{"aria-hidden":"true",focusable:"false",size:"16"});}export function CursorVerticalIcon(){return/*#__PURE__*/_jsx(IconArrowsVertical,{"aria-hidden":"true",focusable:"false",size:"16"});}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { NumberField as BaseNumberField } from "@base-ui/react/number-field";
|
|
2
|
+
import type { ReactElement } from "react";
|
|
3
|
+
import type { NumberFieldDecrementProps, NumberFieldGroupProps, NumberFieldIncrementProps, NumberFieldInputProps, NumberFieldProps, NumberFieldScrubAreaProps } from "./number-field.types";
|
|
4
|
+
export declare function NumberField({ children, id: idProp, onValueChange: userOnValueChange, ref: forwardedRef, render, size, ...rest }: NumberFieldProps): ReactElement;
|
|
5
|
+
export declare function NumberFieldGroup({ children, ref: forwardedRef, render, ...rest }: NumberFieldGroupProps): ReactElement;
|
|
6
|
+
export declare function NumberFieldInput({ onBlur: userOnBlur, ref: forwardedRef, render, ...rest }: NumberFieldInputProps): ReactElement;
|
|
7
|
+
export declare function NumberFieldIncrement({ children, ref: forwardedRef, render, ...rest }: NumberFieldIncrementProps): ReactElement;
|
|
8
|
+
export declare function NumberFieldDecrement({ children, ref: forwardedRef, render, ...rest }: NumberFieldDecrementProps): ReactElement;
|
|
9
|
+
export declare function NumberFieldScrubArea({ children, label, direction, ref: forwardedRef, render, ...rest }: NumberFieldScrubAreaProps): ReactElement;
|
|
10
|
+
export declare const NumberFieldPrimitive: typeof BaseNumberField;
|
|
11
|
+
export type { NumberFieldDecrementProps, NumberFieldGroupProps, NumberFieldIncrementProps, NumberFieldInputProps, NumberFieldProps, NumberFieldScrubAreaProps, NumberFieldSize, } from "./number-field.types";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{NumberField as BaseNumberField}from"@base-ui/react/number-field";import{props}from"@stylexjs/stylex";import{useCallback,useId}from"react";import{omitProps,protectRenderSlot}from"../../render-utils";import{isBoundNumberField,useBoundFieldContext}from"../field/field-context";import{numberFieldStyles}from"./number-field.styles";import{CursorHorizontalIcon,CursorVerticalIcon,MinusIcon,NumberFieldContext,PlusIcon,useNumberFieldContext}from"./number-field-context";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const sizeStyles={default:numberFieldStyles.sizeDefault,lg:numberFieldStyles.sizeLg,sm:numberFieldStyles.sizeSm};const inputSizeStyles={default:numberFieldStyles.inputDefault,lg:numberFieldStyles.inputLg,sm:numberFieldStyles.inputSm};export function NumberField({children,id:idProp,onValueChange:userOnValueChange,ref:forwardedRef,render,size="default",...rest}){const boundContext=useBoundFieldContext();const boundField=isBoundNumberField(boundContext)?boundContext:null;const generatedId=useId();const inputId=idProp??`${generatedId}-input`;const scrubLabelId=`${generatedId}-label`;const handleBoundValueChange=useCallback((val,details)=>{userOnValueChange?.(val,details);if(!details.isCanceled){boundField?.handleChange(val);}},[boundField,userOnValueChange]);const nativeProps=omitProps(rest,["className","data-slot","style"]);return/*#__PURE__*/_jsx(NumberFieldContext.Provider,{value:{boundField,inputId,scrubLabelId,size},children:/*#__PURE__*/_jsx(BaseNumberField.Root,{...nativeProps,...(boundField?{name:boundField.name,onValueChange:handleBoundValueChange,value:boundField.state.value}:{onValueChange:userOnValueChange}),"data-slot":"number-field",id:inputId,ref:forwardedRef,render:protectRenderSlot("number-field",render),...props(numberFieldStyles.root),children:children})});}export function NumberFieldGroup({children,ref:forwardedRef,render,...rest}){const{size}=useNumberFieldContext();Reflect.deleteProperty(rest,"className");Reflect.deleteProperty(rest,"data-slot");Reflect.deleteProperty(rest,"style");return/*#__PURE__*/_jsx(BaseNumberField.Group,{...rest,"data-slot":"number-field-group",ref:forwardedRef,render:protectRenderSlot("number-field-group",render),...props(numberFieldStyles.group,sizeStyles[size]),children:children});}export function NumberFieldInput({onBlur:userOnBlur,ref:forwardedRef,render,...rest}){const{boundField,size}=useNumberFieldContext();const handleBlur=useCallback(event=>{boundField?.handleBlur();userOnBlur?.(event);},[boundField,userOnBlur]);const nativeProps=omitProps(rest,["className","data-slot","style"]);return/*#__PURE__*/_jsx(BaseNumberField.Input,{...nativeProps,"data-size":size,"data-slot":"number-field-input",onBlur:handleBlur,ref:forwardedRef,render:protectRenderSlot("number-field-input",render),...props(numberFieldStyles.input,inputSizeStyles[size])});}export function NumberFieldIncrement({children,ref:forwardedRef,render,...rest}){Reflect.deleteProperty(rest,"className");Reflect.deleteProperty(rest,"data-slot");Reflect.deleteProperty(rest,"style");Reflect.deleteProperty(rest,"tabIndex");return/*#__PURE__*/_jsx(BaseNumberField.Increment,{...rest,"data-slot":"number-field-increment",ref:forwardedRef,render:protectRenderSlot("number-field-increment",render,{tabIndex:-1}),tabIndex:-1,...props(numberFieldStyles.stepper),children:children??/*#__PURE__*/_jsx(PlusIcon,{})});}export function NumberFieldDecrement({children,ref:forwardedRef,render,...rest}){Reflect.deleteProperty(rest,"className");Reflect.deleteProperty(rest,"data-slot");Reflect.deleteProperty(rest,"style");Reflect.deleteProperty(rest,"tabIndex");return/*#__PURE__*/_jsx(BaseNumberField.Decrement,{...rest,"data-slot":"number-field-decrement",ref:forwardedRef,render:protectRenderSlot("number-field-decrement",render,{tabIndex:-1}),tabIndex:-1,...props(numberFieldStyles.stepper),children:children??/*#__PURE__*/_jsx(MinusIcon,{})});}export function NumberFieldScrubArea({children,label,direction="horizontal",ref:forwardedRef,render,...rest}){const{inputId,scrubLabelId}=useNumberFieldContext();Reflect.deleteProperty(rest,"className");Reflect.deleteProperty(rest,"data-direction");Reflect.deleteProperty(rest,"data-slot");Reflect.deleteProperty(rest,"style");return/*#__PURE__*/_jsxs(BaseNumberField.ScrubArea,{...rest,"data-direction":direction,"data-slot":"number-field-scrub-area",direction:direction,ref:forwardedRef,render:protectRenderSlot("number-field-scrub-area",render,{"data-direction":direction}),...props(numberFieldStyles.scrubArea,direction==="vertical"?numberFieldStyles.scrubAreaVertical:null),children:[/*#__PURE__*/_jsx("label",{"data-slot":"number-field-scrub-area-label",htmlFor:inputId,id:scrubLabelId,...props(numberFieldStyles.scrubLabel),children:label??children}),/*#__PURE__*/_jsx(BaseNumberField.ScrubAreaCursor,{"data-slot":"number-field-scrub-area-cursor",...props(numberFieldStyles.scrubAreaCursor),children:direction==="vertical"?/*#__PURE__*/_jsx(CursorVerticalIcon,{}):/*#__PURE__*/_jsx(CursorHorizontalIcon,{})})]});}export const NumberFieldPrimitive=BaseNumberField;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{create}from"@stylexjs/stylex";import"../../styles/colors.stylex";import{colors,fieldColors}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,focus,focusMotion}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,lineHeight}from"../../styles/typography.stylex";export const numberFieldStyles={group:{kGNEyG:"x6s0dn4",k44tkh:"x5dp7bl",kKVMdj:"x1hkl6p9",kWkggS:"x1627ixx x19t41ab xvojraa",kVAM5u:"x10sk57q x1bdy5uv x9r1u3d",ksu8eU:"x1y0btm7",kMzoRj:"x1cdonsl",kGVxlE:"xiy1ocm x1xxjdaf",kB7OPa:"x9f619",kMwMTN:"xdgftgc x14tvo57",k1xSpc:"x78zum5",kjBf7l:"x15jlgto x1uczgqu",kInvED:"x1anx7ov x1w1ofmy",k3XXqK:"x1nmiukf xaatb59",kMeerF:"xogh5yg x1k57tk5",kVQacm:"xb3r6kr",kVAEAm:"x1n2onr6",kIyJzY:"x1e471i8 x1j5v3x2",k1ekBW:"x1xpfdt",kAMwcw:"xvhdtae",kzqmXN:"xh8yej3",$$css:true},input:{k8Qsv1:"x10l60j5",kH8XJS:"x7xwk5j",kysU6D:"xjyslct",kWkggS:"xjbqb8w",kVAM5u:"x9r1u3d",ksu8eU:"xng3xce",kMzoRj:"xc342km",kGVxlE:"x1gnnqk1",kB7OPa:"x9f619",kMwMTN:"x1heor9g",kkrTdU:"x1s07b3s x1ed109x",k1xSpc:"x1lliihq",kCS8Yb:"x1t1x2f9",kzQI83:"x1iyjqo2",kmuXW:"xs83m0k",kMv6JI:"xjb2p0i",kGuDYH:"x12ama9c",kcqcaj:"xss6m8b",k63SB2:"x1lo1l87",kLWn49:"x1rn0pvf",k7Eaqz:"xeuugli",kSiTet:"x1hc1fzr",kjBf7l:"x1uczgqu",k3XXqK:"x1t137rt",kMeerF:"x1k57tk5",k8WAf4:"x1a8o3s8",kg3NbH:"xdbhxi8",k9WMMc:"x2b8uid",kzqmXN:"x14atkfc",$$css:true},inputDefault:{kGuDYH:"x12ama9c",$$css:true},inputLg:{kGuDYH:"x12ama9c",$$css:true},inputSm:{kGuDYH:"xs18rgd x12ama9c",$$css:true},root:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x13hh4mm",kzqmXN:"xh8yej3",$$css:true},scrubArea:{kGNEyG:"x6s0dn4",kkrTdU:"x1fo6bql x7eptgl",k1xSpc:"x3nfvp2",kOIVth:"x13hh4mm",kFalU9:"x5ve5x3",kfSwDN:"x87ps6o",kzqmXN:"xeq5yr9",$$css:true},scrubAreaCursor:{kGNEyG:"x6s0dn4",kWkggS:"xwn18cz",kVAM5u:"x16kvs7",kaIpWk:"x1jw0md8",ksu8eU:"x1y0btm7",kMzoRj:"x1cdonsl",kGVxlE:"xxmju8b",kMwMTN:"x14tvo57",k1xSpc:"x3nfvp2",kZKoxP:"xam5rvr",kjj79g:"xl56j7k",k8WAf4:"x1a8o3s8",kg3NbH:"xdbhxi8",kfzvcC:"x47corl",kzqmXN:"xp8d6y2",kY2c9j:"xa9119d",$$css:true},scrubAreaVertical:{kkrTdU:"x1fo6bql x1e5i8e3",$$css:true},scrubLabel:{kMwMTN:"x14tvo57",kkrTdU:"xmper1u",kGuDYH:"x12ama9c",k63SB2:"x1lo1l87",kLWn49:"x1rn0pvf",kfSwDN:"x87ps6o",$$css:true},sizeDefault:{kaIpWk:"x1jw0md8",kAzted:"x1atkrcx",$$css:true},sizeLg:{kaIpWk:"x1jw0md8",kGuDYH:"x12ama9c",kAzted:"x12eq223",$$css:true},sizeSm:{kaIpWk:"x2b34ud",kGuDYH:"xlh8hku",kAzted:"x1vigsvi",$$css:true},stepper:{kGNEyG:"x6s0dn4",kSGwAc:"xkh2ocl",kysU6D:"xjyslct",kWkggS:"xzgpoov xyqy9un xjbqb8w",kVAM5u:"x9r1u3d",ksu8eU:"xng3xce",kMzoRj:"xc342km",kB7OPa:"x9f619",kMwMTN:"x1ez5psn x1heor9g",kkrTdU:"x1fo6bql x1ypdohk",k1xSpc:"x3nfvp2",kmuXW:"x2lah0s",kjj79g:"xl56j7k",kAzted:"x1rqwxy8",k7Eaqz:"x1xclfui",kjBf7l:"x1uczgqu",k3XXqK:"x1t137rt",kMeerF:"x1k57tk5",k8WAf4:"x1a8o3s8",kg3NbH:"xdbhxi8",kIyJzY:"x1e471i8 x1j5v3x2",k1ekBW:"xs2xxs2",kAMwcw:"xvhdtae",kfSwDN:"x87ps6o",$$css:true}};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { NumberField as NumberFieldPrimitive } from "@base-ui/react/number-field";
|
|
2
|
+
import type { ComponentPropsWithRef, ReactNode } from "react";
|
|
3
|
+
type Closed<T> = Omit<T, "className" | "data-slot" | "style">;
|
|
4
|
+
export type NumberFieldSize = "default" | "sm" | "lg";
|
|
5
|
+
export type NumberFieldProps = Closed<NumberFieldPrimitive.Root.Props> & {
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
ref?: ComponentPropsWithRef<"div">["ref"];
|
|
8
|
+
size?: NumberFieldSize;
|
|
9
|
+
};
|
|
10
|
+
export type NumberFieldGroupProps = Closed<NumberFieldPrimitive.Group.Props> & {
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
ref?: ComponentPropsWithRef<"div">["ref"];
|
|
13
|
+
};
|
|
14
|
+
export type NumberFieldInputProps = Closed<NumberFieldPrimitive.Input.Props> & {
|
|
15
|
+
ref?: ComponentPropsWithRef<"input">["ref"];
|
|
16
|
+
};
|
|
17
|
+
export type NumberFieldIncrementProps = Omit<Closed<NumberFieldPrimitive.Increment.Props>, "tabIndex"> & {
|
|
18
|
+
children?: ReactNode;
|
|
19
|
+
ref?: ComponentPropsWithRef<"button">["ref"];
|
|
20
|
+
};
|
|
21
|
+
export type NumberFieldDecrementProps = Omit<Closed<NumberFieldPrimitive.Decrement.Props>, "tabIndex"> & {
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
ref?: ComponentPropsWithRef<"button">["ref"];
|
|
24
|
+
};
|
|
25
|
+
export type NumberFieldScrubAreaProps = Omit<Closed<NumberFieldPrimitive.ScrubArea.Props>, "data-direction"> & {
|
|
26
|
+
children?: ReactNode;
|
|
27
|
+
label?: string;
|
|
28
|
+
ref?: ComponentPropsWithRef<"span">["ref"];
|
|
29
|
+
};
|
|
30
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OTPField as BaseOTPField } from "@base-ui/react/otp-field";
|
|
2
|
+
import type { ComponentPropsWithRef, ReactElement, ReactNode } from "react";
|
|
3
|
+
export type Closed<T> = Omit<T, "className" | "data-slot" | "style">;
|
|
4
|
+
export type OTPFieldSize = "default" | "sm" | "lg";
|
|
5
|
+
export type OTPFieldProps = Closed<BaseOTPField.Root.Props> & {
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
length: number;
|
|
8
|
+
ref?: ComponentPropsWithRef<"div">["ref"];
|
|
9
|
+
size?: OTPFieldSize;
|
|
10
|
+
};
|
|
11
|
+
export type OTPFieldInputProps = Closed<BaseOTPField.Input.Props> & {
|
|
12
|
+
ref?: ComponentPropsWithRef<"input">["ref"];
|
|
13
|
+
};
|
|
14
|
+
export type OTPFieldSeparatorProps = Closed<BaseOTPField.Separator.Props> & {
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
ref?: ComponentPropsWithRef<"div">["ref"];
|
|
17
|
+
};
|
|
18
|
+
export declare function OTPField({ children, length, onBlur: userOnBlur, onValueChange: userOnValueChange, ref: forwardedRef, render, size, ...rest }: OTPFieldProps): ReactElement;
|
|
19
|
+
export declare function OTPFieldInput({ ref: forwardedRef, render, ...rest }: OTPFieldInputProps): ReactElement;
|
|
20
|
+
export declare function OTPFieldSeparator({ children, ref: forwardedRef, render, ...rest }: OTPFieldSeparatorProps): ReactElement;
|
|
21
|
+
export declare const OTPFieldPrimitive: typeof BaseOTPField;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{OTPField as BaseOTPField}from"@base-ui/react/otp-field";import{props}from"@stylexjs/stylex";import{createContext,useCallback,useContext}from"react";import{omitProps,protectRenderSlot}from"../../render-utils";import{isBoundStringField,useBoundFieldContext}from"../field/field-context";import{otpFieldStyles}from"./otp-field.styles";import{jsx as _jsx}from"react/jsx-runtime";const OTPFieldContext=createContext({size:"default"});function renderDefaultSlots(length){const slots=[];for(let index=0;index<length;index+=1){slots.push(/*#__PURE__*/_jsx(OTPFieldInput,{},`otp-field-input-${index}`));}return slots;}export function OTPField({children,length,onBlur:userOnBlur,onValueChange:userOnValueChange,ref:forwardedRef,render,size="default",...rest}){const boundContext=useBoundFieldContext();const boundField=isBoundStringField(boundContext)?boundContext:null;const handleBoundBlur=useCallback(event=>{userOnBlur?.(event);if(!(event.relatedTarget instanceof Node&&event.currentTarget.contains(event.relatedTarget))){boundField?.handleBlur();}},[boundField,userOnBlur]);const handleBoundValueChange=useCallback((val,details)=>{userOnValueChange?.(val,details);if(!details.isCanceled){boundField?.handleChange(val);}},[boundField,userOnValueChange]);const nativeProps=omitProps(rest,["className","data-slot","style"]);const content=children===undefined?renderDefaultSlots(length):children;return/*#__PURE__*/_jsx(OTPFieldContext.Provider,{value:{size},children:/*#__PURE__*/_jsx(BaseOTPField.Root,{...nativeProps,...(boundField?{name:boundField.name,onBlur:handleBoundBlur,onValueChange:handleBoundValueChange,value:boundField.state.value}:{onBlur:userOnBlur,onValueChange:userOnValueChange}),"data-size":size,"data-slot":"otp-field",length:length,ref:forwardedRef,render:protectRenderSlot("otp-field",render,{"data-size":size}),...props(otpFieldStyles.root),children:content})});}const inputSizeStyles={default:otpFieldStyles.inputDefault,lg:otpFieldStyles.inputLg,sm:otpFieldStyles.inputSm};export function OTPFieldInput({ref:forwardedRef,render,...rest}){const{size}=useContext(OTPFieldContext);Reflect.deleteProperty(rest,"className");Reflect.deleteProperty(rest,"data-slot");Reflect.deleteProperty(rest,"style");return/*#__PURE__*/_jsx(BaseOTPField.Input,{...rest,"data-size":size,"data-slot":"otp-field-input",ref:forwardedRef,render:protectRenderSlot("otp-field-input",render,{"data-size":size}),...props(otpFieldStyles.input,inputSizeStyles[size])});}export function OTPFieldSeparator({children,ref:forwardedRef,render,...rest}){Reflect.deleteProperty(rest,"className");Reflect.deleteProperty(rest,"data-slot");Reflect.deleteProperty(rest,"style");return/*#__PURE__*/_jsx(BaseOTPField.Separator,{...rest,"data-slot":"otp-field-separator",ref:forwardedRef,render:protectRenderSlot("otp-field-separator",render),...props(otpFieldStyles.separator),children:children});}export const OTPFieldPrimitive=BaseOTPField;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{create}from"@stylexjs/stylex";import"../../styles/colors.stylex";import{colors,fieldColors}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,focus,focusMotion,focusOutline}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,lineHeight}from"../../styles/typography.stylex";export const otpFieldStyles={input:{k8Qsv1:"x10l60j5",kH8XJS:"x7xwk5j",k44tkh:"x1iha7go",kKVMdj:"x1b5t0b2",kysU6D:"xjyslct",kOBAk4:"x1plog1",kWkggS:"xnkn13k x1uyda3a xxy274o x18irba8 x1ikxaq8 xvojraa",kVAM5u:"x1d6b12j xx0rnbg x9r1u3d",ksu8eU:"x1y0btm7",kMzoRj:"x1cdonsl",kGVxlE:"x1wzvpah x1xxjdaf",kB7OPa:"x9f619",kMwMTN:"x67n4mj x14tvo57",kkrTdU:"x57cc4 x1ed109x",k1xSpc:"x1lliihq",kMv6JI:"xjb2p0i",kGuDYH:"x12ama9c",kcqcaj:"xss6m8b",k63SB2:"x1lo1l87",kLWn49:"x1rn0pvf",k7Eaqz:"xzx07ka",kjBf7l:"x4dprnk x1uczgqu",kInvED:"x7jjmpn x1w1ofmy",k3XXqK:"x9v5kkp xzc55om",kMeerF:"xm9seqh x1vhx2qj",k8WAf4:"x1a8o3s8",kg3NbH:"x19y3ds7",k9WMMc:"x2b8uid",kIyJzY:"x1e471i8 x1j5v3x2",k1ekBW:"x1xpfdt",kAMwcw:"xvhdtae",$$css:true},inputDefault:{kaIpWk:"x1jw0md8",kGuDYH:"x12ama9c",kZKoxP:"xt7dq6l",kzqmXN:"xkpcdi8",$$css:true},inputLg:{kaIpWk:"x1jw0md8",kGuDYH:"x12ama9c",kZKoxP:"xt7dq6l",kzqmXN:"x1kmmwjt",$$css:true},inputSm:{kaIpWk:"x2b34ud",kGuDYH:"xs18rgd x12ama9c",kZKoxP:"xt7dq6l",kzqmXN:"x14pcf9u",$$css:true},root:{kGNEyG:"x6s0dn4",kB7OPa:"x9f619",k1xSpc:"x3nfvp2",kOIVth:"xp4ho6d",ks0D6T:"x193iq5w",k7Eaqz:"xeuugli",kXHlph:"xw2csxc",kmVPX3:"x17y9dx8",katHQp:"x1g2bcle",$$css:true},separator:{kGNEyG:"x6s0dn4",kMwMTN:"xbb0na1",k1xSpc:"x3nfvp2",kGuDYH:"x12ama9c",kjj79g:"xl56j7k",kLWn49:"x1wrb330",kfSwDN:"x87ps6o",$$css:true}};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactElement } from "react";
|
|
2
|
+
import type { Closed } from "../../closed";
|
|
3
|
+
import type { ListItemProps } from "../list/list";
|
|
4
|
+
export type OverflowListProps = Omit<Closed<ComponentPropsWithRef<"div">>, "aria-label" | "children" | "data-slot" | "role"> & {
|
|
5
|
+
"aria-label": string;
|
|
6
|
+
children?: ReactElement<ListItemProps> | readonly ReactElement<ListItemProps>[];
|
|
7
|
+
visibleCount?: number;
|
|
8
|
+
overflowLabel?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function OverflowList({ "aria-label": ariaLabel, children, overflowLabel, ref: forwardedRef, visibleCount, ...rest }: OverflowListProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";import{props}from"@stylexjs/stylex";import{Children}from"react";import{typeRoles}from"../../styles/typography.styles";import{Button}from"../button/button";import{Popover,PopoverPopup,PopoverTrigger}from"../popover/popover";import{overflowListStyles}from"./overflow-list.styles";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export function OverflowList({"aria-label":ariaLabel,children,overflowLabel="More items",ref:forwardedRef,visibleCount=3,...rest}){if(!ariaLabel?.trim()){throw new TypeError("OverflowList requires a non-empty aria-label.");}if(!Number.isSafeInteger(visibleCount)||visibleCount<0){throw new RangeError("visibleCount must be a non-negative safe integer");}for(const prop of["className","data-slot","role","style"]){Reflect.deleteProperty(rest,prop);}const items=Children.toArray(children);const visibleItems=items.slice(0,visibleCount);const overflowItems=items.slice(visibleItems.length);return/*#__PURE__*/_jsx("div",{...rest,"data-slot":"overflow-list",ref:forwardedRef,children:/*#__PURE__*/_jsxs("ul",{"aria-label":ariaLabel,"data-slot":"overflow-list-items"// biome-ignore lint/a11y/noRedundantRoles: list markers are removed, which can hide list semantics in Safari.
|
|
2
|
+
,role:"list",...props(overflowListStyles.items,typeRoles.body),children:[visibleItems,overflowItems.length>0?/*#__PURE__*/_jsx("li",{"data-slot":"overflow-list-trigger-item",...props(overflowListStyles.triggerItem),children:/*#__PURE__*/_jsxs(Popover,{children:[/*#__PURE__*/_jsxs(PopoverTrigger,{"aria-label":`${overflowLabel} (${overflowItems.length})`,render:/*#__PURE__*/_jsx(Button,{size:"sm",variant:"outline"}),children:[overflowLabel," (",overflowItems.length,")"]}),/*#__PURE__*/_jsx(PopoverPopup,{"aria-label":overflowLabel,children:/*#__PURE__*/_jsx("ul",{"aria-label":overflowLabel,"data-slot":"overflow-list-menu"// biome-ignore lint/a11y/noRedundantRoles: list markers are removed, which can hide list semantics in Safari.
|
|
3
|
+
,role:"list",...props(overflowListStyles.menu,typeRoles.body),children:overflowItems})})]})}):null]})});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{create}from"@stylexjs/stylex";import"../../styles/spacing.stylex";import{space}from"../../styles/spacing.stylex";export const overflowListStyles={items:{kGNEyG:"x6s0dn4",k1xSpc:"x78zum5",kwnvtZ:"x1a02dak",kOIVth:"xp4ho6d",kH6xsr:"x3ct3a4",kogj98:"x1ghz6dp",k7Eaqz:"xeuugli",kZCmMZ:"x1c1uobl",$$css:true},menu:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x13hh4mm",kH6xsr:"x3ct3a4",kogj98:"x1ghz6dp",k7Eaqz:"xeuugli",kZCmMZ:"x1c1uobl",$$css:true},triggerItem:{kcqcaj:"xss6m8b",$$css:true}};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
+
import type { Closed } from "../../closed";
|
|
3
|
+
type Part<T> = Omit<Closed<T>, "data-slot" | "role">;
|
|
4
|
+
export type PaginationLinkProps = Part<useRender.ComponentProps<"a">> & {
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
active?: boolean;
|
|
7
|
+
size?: "default" | "icon";
|
|
8
|
+
};
|
|
9
|
+
export declare function PaginationLink({ children, disabled, active, ref: forwardedRef, render, size, ...rest }: PaginationLinkProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{mergeProps}from"@base-ui/react/merge-props";import{useRender}from"@base-ui/react/use-render";import{props}from"@stylexjs/stylex";import{controlLabel}from"../../control-label";import{protectRenderSlot}from"../../render-utils";import{paginationStyles}from"./pagination.styles";function preventDisabledNavigation(event){event.preventDefault();}function preventDisabledActivation(event){if(event.key==="Enter"){event.preventDefault();}}function getLinkProps(linkProps,children,active,disabled,size){const{onAuxClick,onClick,onKeyDown,...nativeProps}=linkProps;const interactionProps=disabled?{href:undefined,onAuxClick:preventDisabledNavigation,onClick:preventDisabledNavigation,onKeyDown:preventDisabledActivation,tabIndex:-1}:{onAuxClick,onClick,onKeyDown};return mergeProps(nativeProps,{...props(paginationStyles.link,size==="default"?paginationStyles.labelled:paginationStyles.iconSize,!disabled&&paginationStyles.interactive,active?paginationStyles.active:null,disabled?paginationStyles.disabled:null),"aria-current":active?"page":undefined,"aria-disabled":disabled||undefined,children:controlLabel(children),"data-size":size,"data-slot":"pagination-link",...interactionProps});}export function PaginationLink({children,disabled=false,active=false,ref:forwardedRef,render,size="icon",...rest}){Reflect.deleteProperty(rest,"className");Reflect.deleteProperty(rest,"data-slot");Reflect.deleteProperty(rest,"role");Reflect.deleteProperty(rest,"style");return useRender({defaultTagName:"a",props:getLinkProps(rest,children,active,disabled,size),ref:forwardedRef,render:disabled?undefined:protectRenderSlot("pagination-link",render,{"aria-current":active?"page":undefined,"aria-disabled":undefined})});}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef, ReactNode } from "react";
|
|
2
|
+
import type { Closed } from "../../closed";
|
|
3
|
+
import { type PaginationLinkProps } from "./pagination-link";
|
|
4
|
+
export type { PaginationLinkProps } from "./pagination-link";
|
|
5
|
+
export { PaginationLink } from "./pagination-link";
|
|
6
|
+
type Part<T> = Omit<Closed<T>, "data-slot" | "role">;
|
|
7
|
+
export type PaginationProps = Omit<Part<ComponentPropsWithRef<"nav">>, "aria-label"> & {
|
|
8
|
+
"aria-label"?: string;
|
|
9
|
+
};
|
|
10
|
+
export type PaginationContentProps = Part<ComponentPropsWithRef<"ul">>;
|
|
11
|
+
export type PaginationItemProps = Part<ComponentPropsWithRef<"li">>;
|
|
12
|
+
export type PaginationPreviousProps = Omit<PaginationLinkProps, "children" | "active"> & {
|
|
13
|
+
children?: ReactNode;
|
|
14
|
+
};
|
|
15
|
+
export type PaginationNextProps = PaginationPreviousProps;
|
|
16
|
+
export type PaginationEllipsisProps = Part<ComponentPropsWithRef<"span">>;
|
|
17
|
+
export declare function Pagination({ "aria-label": ariaLabel, children, ref: forwardedRef, ...rest }: PaginationProps): import("react").JSX.Element;
|
|
18
|
+
export declare function PaginationContent({ children, ref: forwardedRef, ...rest }: PaginationContentProps): import("react").JSX.Element;
|
|
19
|
+
export declare function PaginationItem({ children, ref: forwardedRef, ...rest }: PaginationItemProps): import("react").JSX.Element;
|
|
20
|
+
export declare function PaginationPrevious({ children, ...rest }: PaginationPreviousProps): import("react").JSX.Element;
|
|
21
|
+
export declare function PaginationNext({ children, ...rest }: PaginationNextProps): import("react").JSX.Element;
|
|
22
|
+
export declare function PaginationEllipsis({ ref: forwardedRef, ...rest }: PaginationEllipsisProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{props}from"@stylexjs/stylex";import{IconChevronLeft,IconChevronRight}from"../../icons";import{paginationStyles}from"./pagination.styles";import{PaginationLink}from"./pagination-link";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";// biome-ignore lint/performance/noBarrelFile: Keep the link API beside the native pagination anatomy.
|
|
2
|
+
export{PaginationLink}from"./pagination-link";function stripClosedProps(target){Reflect.deleteProperty(target,"className");Reflect.deleteProperty(target,"data-slot");Reflect.deleteProperty(target,"role");Reflect.deleteProperty(target,"style");return target;}function Chevron({direction}){return direction==="left"?/*#__PURE__*/_jsx(IconChevronLeft,{"aria-hidden":"true",focusable:"false",...props(paginationStyles.icon),size:16}):/*#__PURE__*/_jsx(IconChevronRight,{"aria-hidden":"true",focusable:"false",...props(paginationStyles.icon),size:16});}export function Pagination({"aria-label":ariaLabel="Pagination",children,ref:forwardedRef,...rest}){stripClosedProps(rest);return/*#__PURE__*/_jsx("nav",{...rest,"aria-label":ariaLabel,"data-slot":"pagination",ref:forwardedRef,...props(paginationStyles.root),children:children});}export function PaginationContent({children,ref:forwardedRef,...rest}){stripClosedProps(rest);return/*#__PURE__*/_jsx("ul",{...rest,"data-slot":"pagination-content",ref:forwardedRef,...props(paginationStyles.content),children:children});}export function PaginationItem({children,ref:forwardedRef,...rest}){stripClosedProps(rest);return/*#__PURE__*/_jsx("li",{...rest,"data-slot":"pagination-item",ref:forwardedRef,...props(paginationStyles.item),children:children});}export function PaginationPrevious({children="Previous",...rest}){return/*#__PURE__*/_jsxs(PaginationLink,{"aria-label":"Go to previous page",size:"default",...rest,children:[/*#__PURE__*/_jsx(Chevron,{direction:"left"}),/*#__PURE__*/_jsx("span",{...props(paginationStyles.directionLabel),children:children})]});}export function PaginationNext({children="Next",...rest}){return/*#__PURE__*/_jsxs(PaginationLink,{"aria-label":"Go to next page",size:"default",...rest,children:[/*#__PURE__*/_jsx("span",{...props(paginationStyles.directionLabel),children:children}),/*#__PURE__*/_jsx(Chevron,{direction:"right"})]});}export function PaginationEllipsis({ref:forwardedRef,...rest}){stripClosedProps(rest);return/*#__PURE__*/_jsxs("span",{...rest,"data-slot":"pagination-ellipsis",ref:forwardedRef,...props(paginationStyles.ellipsis),children:[/*#__PURE__*/_jsx("span",{"aria-hidden":"true",children:"…"}),/*#__PURE__*/_jsx("span",{...props(paginationStyles.srOnly),children:"More pages"})]});}
|