@botiverse/raft-ui 0.51.0 → 0.52.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/CHANGELOG.md +20 -0
- package/dist/components/activity-inbox/activity-inbox-shell.d.mts +12 -0
- package/dist/components/activity-inbox/activity-inbox-shell.mjs +39 -0
- package/dist/components/activity-inbox/activity-inbox-shell.recipe.mjs +14 -0
- package/dist/components/activity-inbox/activity-inbox-sidebar.d.mts +6 -0
- package/dist/components/activity-inbox/activity-inbox-sidebar.mjs +22 -0
- package/dist/components/activity-inbox/activity-inbox-sidebar.recipe.mjs +22 -0
- package/dist/components/activity-inbox/activity-inbox-toolbar.d.mts +9 -0
- package/dist/components/activity-inbox/activity-inbox-toolbar.mjs +29 -0
- package/dist/components/activity-inbox/activity-inbox-toolbar.recipe.mjs +14 -0
- package/dist/components/activity-inbox/index.d.mts +4 -0
- package/dist/components/alert-dialog/alert-dialog.d.mts +41 -0
- package/dist/components/alert-dialog/alert-dialog.mjs +163 -0
- package/dist/components/alert-dialog/index.d.mts +2 -0
- package/dist/components/announcement-dialog/announcement-dialog.d.mts +18 -0
- package/dist/components/announcement-dialog/announcement-dialog.mjs +121 -0
- package/dist/components/announcement-dialog/index.d.mts +3 -0
- package/dist/components/app-rail/app-rail.d.mts +31 -0
- package/dist/components/app-rail/app-rail.mjs +126 -0
- package/dist/components/app-rail/app-rail.recipe.mjs +47 -0
- package/dist/components/app-rail/index.d.mts +2 -0
- package/dist/components/app-shell/app-shell.d.mts +27 -0
- package/dist/components/app-shell/app-shell.mjs +217 -0
- package/dist/components/app-shell/index.d.mts +2 -0
- package/dist/components/avatar/avatar.d.mts +169 -0
- package/dist/components/avatar/avatar.mjs +298 -0
- package/dist/components/avatar/index.d.mts +2 -0
- package/dist/components/badge/badge.d.mts +89 -0
- package/dist/components/badge/badge.mjs +203 -0
- package/dist/components/badge/index.d.mts +2 -0
- package/dist/components/banner/banner.d.mts +141 -0
- package/dist/components/banner/banner.mjs +228 -0
- package/dist/components/banner/index.d.mts +2 -0
- package/dist/components/button/button.d.mts +257 -0
- package/dist/components/button/button.mjs +177 -0
- package/dist/components/button/index.d.mts +2 -0
- package/dist/components/card/card.d.mts +21 -0
- package/dist/components/card/card.mjs +114 -0
- package/dist/components/card/card.recipe.d.mts +105 -0
- package/dist/components/card/card.recipe.mjs +67 -0
- package/dist/components/card/index.d.mts +2 -0
- package/dist/components/checkbox/checkbox-indicator.d.mts +92 -0
- package/dist/components/checkbox/checkbox-indicator.mjs +61 -0
- package/dist/components/checkbox/checkbox.d.mts +9 -0
- package/dist/components/checkbox/checkbox.mjs +40 -0
- package/dist/components/checkbox/index.d.mts +3 -0
- package/dist/components/choice-list/choice-list.d.mts +103 -0
- package/dist/components/choice-list/choice-list.mjs +301 -0
- package/dist/components/choice-list/choice-list.recipe.mjs +44 -0
- package/dist/components/choice-list/index.d.mts +2 -0
- package/dist/components/code-block/code-block.d.mts +30 -0
- package/dist/components/code-block/code-block.mjs +151 -0
- package/dist/components/code-block/code-block.recipe.mjs +47 -0
- package/dist/components/code-block/index.d.mts +2 -0
- package/dist/components/combobox/combobox.d.mts +69 -0
- package/dist/components/combobox/combobox.mjs +438 -0
- package/dist/components/combobox/index.d.mts +2 -0
- package/dist/components/combobox-select/combobox-select.d.mts +4 -0
- package/dist/components/combobox-select/combobox-select.list-side.mjs +16 -0
- package/dist/components/combobox-select/combobox-select.mjs +473 -0
- package/dist/components/combobox-select/combobox-select.options.mjs +21 -0
- package/dist/components/combobox-select/combobox-select.types.d.mts +83 -0
- package/dist/components/combobox-select/index.d.mts +3 -0
- package/dist/components/comment/comment-card.d.mts +40 -0
- package/dist/components/comment/comment-card.mjs +83 -0
- package/dist/components/comment/comment-entry.d.mts +24 -0
- package/dist/components/comment/comment-entry.mjs +75 -0
- package/dist/components/comment/comment-highlight.d.mts +18 -0
- package/dist/components/comment/comment-highlight.mjs +33 -0
- package/dist/components/comment/comment-margin-layout.d.mts +32 -0
- package/dist/components/comment/comment-margin-layout.mjs +44 -0
- package/dist/components/comment/comment-margin.d.mts +29 -0
- package/dist/components/comment/comment-margin.mjs +164 -0
- package/dist/components/comment/comment-marker.d.mts +16 -0
- package/dist/components/comment/comment-marker.mjs +24 -0
- package/dist/components/comment/comment.recipe.mjs +58 -0
- package/dist/components/comment/index.d.mts +8 -0
- package/dist/components/comment/use-comment-margin-fits.d.mts +16 -0
- package/dist/components/comment/use-comment-margin-fits.mjs +34 -0
- package/dist/components/composer/composer-attachment.recipe.mjs +85 -0
- package/dist/components/composer/composer-attachments-scroll-area.d.mts +5 -0
- package/dist/components/composer/composer-attachments-scroll-area.mjs +93 -0
- package/dist/components/composer/composer-attachments.d.mts +27 -0
- package/dist/components/composer/composer-attachments.mjs +147 -0
- package/dist/components/composer/composer-drop-overlay.d.mts +9 -0
- package/dist/components/composer/composer-drop-overlay.mjs +60 -0
- package/dist/components/composer/composer-drop-overlay.recipe.mjs +23 -0
- package/dist/components/composer/composer-root.d.mts +5 -0
- package/dist/components/composer/composer-root.mjs +18 -0
- package/dist/components/composer/composer-suggestion-list.d.mts +139 -0
- package/dist/components/composer/composer-suggestion-list.mjs +160 -0
- package/dist/components/composer/composer-toolbar-label.d.mts +5 -0
- package/dist/components/composer/composer-toolbar-label.mjs +24 -0
- package/dist/components/composer/composer.d.mts +20 -0
- package/dist/components/composer/composer.mjs +88 -0
- package/dist/components/composer/composer.recipe.mjs +29 -0
- package/dist/components/composer/index.d.mts +10 -0
- package/dist/components/composer/sortable-composer-attachments.d.mts +37 -0
- package/dist/components/composer/sortable-composer-attachments.mjs +247 -0
- package/dist/components/composer/use-composer-suggestions.d.mts +83 -0
- package/dist/components/composer/use-composer-suggestions.mjs +207 -0
- package/dist/components/context-menu/context-menu.d.mts +53 -0
- package/dist/components/context-menu/context-menu.mjs +275 -0
- package/dist/components/context-menu/index.d.mts +2 -0
- package/dist/components/conversation-panel/conversation-panel-empty-state.d.mts +9 -0
- package/dist/components/conversation-panel/conversation-panel-empty-state.mjs +57 -0
- package/dist/components/conversation-panel/conversation-panel.d.mts +20 -0
- package/dist/components/conversation-panel/conversation-panel.mjs +63 -0
- package/dist/components/conversation-panel/conversation-panel.recipe.mjs +15 -0
- package/dist/components/conversation-panel/index.d.mts +3 -0
- package/dist/components/copyable-code/copyable-code.d.mts +72 -0
- package/dist/components/copyable-code/copyable-code.mjs +153 -0
- package/dist/components/copyable-code/index.d.mts +2 -0
- package/dist/components/description-list/description-list.d.mts +59 -0
- package/dist/components/description-list/description-list.mjs +96 -0
- package/dist/components/description-list/index.d.mts +2 -0
- package/dist/components/dialog/dialog-sheet-context.mjs +58 -0
- package/dist/components/dialog/dialog-sheet.d.mts +31 -0
- package/dist/components/dialog/dialog-sheet.mjs +194 -0
- package/dist/components/dialog/dialog.d.mts +85 -0
- package/dist/components/dialog/dialog.mjs +371 -0
- package/dist/components/dialog/index.d.mts +3 -0
- package/dist/components/drag/drag-announcements.d.mts +72 -0
- package/dist/components/drag/drag-announcements.mjs +115 -0
- package/dist/components/drag/drag-lift.d.mts +100 -0
- package/dist/components/drag/drag-lift.mjs +276 -0
- package/dist/components/drag/drag-lists.d.mts +98 -0
- package/dist/components/drag/drag-lists.mjs +258 -0
- package/dist/components/drag/drag-sensors.d.mts +87 -0
- package/dist/components/drag/drag-sensors.mjs +169 -0
- package/dist/components/drag/drag.recipe.d.mts +7 -0
- package/dist/components/drag/drag.recipe.mjs +30 -0
- package/dist/components/drag/drop-placeholder.d.mts +41 -0
- package/dist/components/drag/drop-placeholder.mjs +161 -0
- package/dist/components/drag/index.d.mts +8 -0
- package/dist/components/drawer/drawer.d.mts +34 -0
- package/dist/components/drawer/drawer.mjs +202 -0
- package/dist/components/drawer/drawer.recipe.mjs +175 -0
- package/dist/components/drawer/index.d.mts +2 -0
- package/dist/components/dropdown-menu/dropdown-menu.d.mts +62 -0
- package/dist/components/dropdown-menu/dropdown-menu.mjs +319 -0
- package/dist/components/dropdown-menu/index.d.mts +2 -0
- package/dist/components/ellipsis/ellipsis.d.mts +55 -0
- package/dist/components/ellipsis/ellipsis.mjs +320 -0
- package/dist/components/ellipsis/index.d.mts +3 -0
- package/dist/components/empty-state/empty-state.d.mts +15 -0
- package/dist/components/empty-state/empty-state.mjs +102 -0
- package/dist/components/empty-state/index.d.mts +2 -0
- package/dist/components/field/field.d.mts +79 -0
- package/dist/components/field/field.mjs +100 -0
- package/dist/components/field/index.d.mts +2 -0
- package/dist/components/file-preview/file-preview.d.mts +17 -0
- package/dist/components/file-preview/file-preview.mjs +210 -0
- package/dist/components/file-preview/file-preview.recipe.d.mts +99 -0
- package/dist/components/file-preview/file-preview.recipe.mjs +39 -0
- package/dist/components/file-preview/index.d.mts +2 -0
- package/dist/components/files/files.d.mts +35 -0
- package/dist/components/files/files.mjs +69 -0
- package/dist/components/files/files.recipe.mjs +40 -0
- package/dist/components/files/index.d.mts +2 -0
- package/dist/components/filter-chip/filter-chip.d.mts +25 -0
- package/dist/components/filter-chip/filter-chip.mjs +59 -0
- package/dist/components/filter-chip/index.d.mts +2 -0
- package/dist/components/float-button/float-button.d.mts +36 -0
- package/dist/components/float-button/float-button.mjs +116 -0
- package/dist/components/float-button/float-button.position.d.mts +6 -0
- package/dist/components/float-button/float-button.position.mjs +41 -0
- package/dist/components/float-button/index.d.mts +3 -0
- package/dist/components/form-section/form-section.d.mts +16 -0
- package/dist/components/form-section/form-section.mjs +53 -0
- package/dist/components/form-section/index.d.mts +2 -0
- package/dist/components/icon-tile/icon-tile.d.mts +97 -0
- package/dist/components/icon-tile/icon-tile.mjs +49 -0
- package/dist/components/icon-tile/index.d.mts +2 -0
- package/dist/components/icons/action-icons.d.mts +34 -0
- package/dist/components/icons/action-icons.mjs +383 -0
- package/dist/components/icons/conversation-icons.d.mts +12 -0
- package/dist/components/icons/conversation-icons.mjs +147 -0
- package/dist/components/icons/index.d.mts +4 -0
- package/dist/components/icons/object-icons.d.mts +6 -0
- package/dist/components/icons/object-icons.mjs +27 -0
- package/dist/components/inbox-item/inbox-item-leading-badge.d.mts +13 -0
- package/dist/components/inbox-item/inbox-item-leading-badge.mjs +27 -0
- package/dist/components/inbox-item/inbox-item-skeleton.d.mts +46 -0
- package/dist/components/inbox-item/inbox-item-skeleton.mjs +89 -0
- package/dist/components/inbox-item/inbox-item-skeleton.recipe.mjs +20 -0
- package/dist/components/inbox-item/inbox-item.d.mts +71 -0
- package/dist/components/inbox-item/inbox-item.mjs +276 -0
- package/dist/components/inbox-item/inbox-item.recipe.mjs +137 -0
- package/dist/components/inbox-item/index.d.mts +2 -0
- package/dist/components/inline-code/index.d.mts +2 -0
- package/dist/components/inline-code/inline-code.d.mts +8 -0
- package/dist/components/inline-code/inline-code.mjs +30 -0
- package/dist/components/input/index.d.mts +2 -0
- package/dist/components/input/input.d.mts +16 -0
- package/dist/components/input/input.mjs +20 -0
- package/dist/components/input/input.recipe.mjs +12 -0
- package/dist/components/input-group/index.d.mts +2 -0
- package/dist/components/input-group/input-group.d.mts +93 -0
- package/dist/components/input-group/input-group.mjs +178 -0
- package/dist/components/kbd/index.d.mts +2 -0
- package/dist/components/kbd/kbd.d.mts +7 -0
- package/dist/components/kbd/kbd.mjs +34 -0
- package/dist/components/label/index.d.mts +2 -0
- package/dist/components/label/label.d.mts +60 -0
- package/dist/components/label/label.mjs +75 -0
- package/dist/components/legacy-task-panel/index.d.mts +2 -0
- package/dist/components/legacy-task-panel/legacy-task-panel.d.mts +57 -0
- package/dist/components/legacy-task-panel/legacy-task-panel.mjs +234 -0
- package/dist/components/legacy-task-panel/legacy-task-panel.recipe.mjs +30 -0
- package/dist/components/lightbox/index.d.mts +2 -0
- package/dist/components/lightbox/lightbox.d.mts +55 -0
- package/dist/components/lightbox/lightbox.mjs +336 -0
- package/dist/components/list-row/index.d.mts +2 -0
- package/dist/components/list-row/list-row-skeleton.d.mts +21 -0
- package/dist/components/list-row/list-row-skeleton.mjs +43 -0
- package/dist/components/list-row/list-row.d.mts +66 -0
- package/dist/components/list-row/list-row.mjs +167 -0
- package/dist/components/list-row/list-row.recipe.d.mts +126 -0
- package/dist/components/list-row/list-row.recipe.mjs +94 -0
- package/dist/components/live-agent-activity-bar/index.d.mts +2 -0
- package/dist/components/live-agent-activity-bar/live-agent-activity-bar.d.mts +25 -0
- package/dist/components/live-agent-activity-bar/live-agent-activity-bar.mjs +107 -0
- package/dist/components/logo/index.d.mts +2 -0
- package/dist/components/logo/raft-logo.d.mts +9 -0
- package/dist/components/logo/raft-logo.mjs +63 -0
- package/dist/components/markdown/index.d.mts +2 -0
- package/dist/components/markdown/markdown-parts.d.mts +54 -0
- package/dist/components/markdown/markdown-parts.mjs +153 -0
- package/dist/components/markdown/markdown.recipe.mjs +77 -0
- package/dist/components/message-action-card/index.d.mts +2 -0
- package/dist/components/message-action-card/message-action-card-content.recipe.mjs +50 -0
- package/dist/components/message-action-card/message-action-card.d.mts +95 -0
- package/dist/components/message-action-card/message-action-card.mjs +298 -0
- package/dist/components/message-action-card/message-action-card.recipe.mjs +47 -0
- package/dist/components/message-attachment/index.d.mts +5 -0
- package/dist/components/message-attachment/message-attachment.d.mts +27 -0
- package/dist/components/message-attachment/message-attachment.mjs +129 -0
- package/dist/components/message-attachment/message-attachment.recipe.mjs +36 -0
- package/dist/components/message-attachment/message-image-gallery-rows.d.mts +47 -0
- package/dist/components/message-attachment/message-image-gallery-rows.mjs +55 -0
- package/dist/components/message-attachment/message-image-gallery.d.mts +32 -0
- package/dist/components/message-attachment/message-image-gallery.mjs +105 -0
- package/dist/components/message-attachment/message-image-gallery.recipe.mjs +61 -0
- package/dist/components/message-attachment/message-video-preview.d.mts +19 -0
- package/dist/components/message-attachment/message-video-preview.mjs +92 -0
- package/dist/components/message-attachment/message-video-preview.recipe.mjs +33 -0
- package/dist/components/message-embed/index.d.mts +2 -0
- package/dist/components/message-embed/message-embed.d.mts +12 -0
- package/dist/components/message-embed/message-embed.mjs +42 -0
- package/dist/components/message-embed/message-embed.recipe.mjs +14 -0
- package/dist/components/message-forwarded-bundle/index.d.mts +2 -0
- package/dist/components/message-forwarded-bundle/message-forwarded-bundle.d.mts +92 -0
- package/dist/components/message-forwarded-bundle/message-forwarded-bundle.mjs +324 -0
- package/dist/components/message-forwarded-bundle/message-forwarded-bundle.recipe.mjs +81 -0
- package/dist/components/message-item/index.d.mts +13 -0
- package/dist/components/message-item/message-footer.d.mts +20 -0
- package/dist/components/message-item/message-footer.mjs +54 -0
- package/dist/components/message-item/message-footer.recipe.mjs +46 -0
- package/dist/components/message-item/message-item-content.d.mts +22 -0
- package/dist/components/message-item/message-item-content.mjs +81 -0
- package/dist/components/message-item/message-item-delegated.d.mts +38 -0
- package/dist/components/message-item/message-item-delegated.mjs +72 -0
- package/dist/components/message-item/message-item-gutter.d.mts +10 -0
- package/dist/components/message-item/message-item-gutter.mjs +41 -0
- package/dist/components/message-item/message-item-header.d.mts +29 -0
- package/dist/components/message-item/message-item-header.mjs +107 -0
- package/dist/components/message-item/message-item-label.mjs +113 -0
- package/dist/components/message-item/message-item-root.d.mts +25 -0
- package/dist/components/message-item/message-item-root.mjs +39 -0
- package/dist/components/message-item/message-item-toolbar.d.mts +9 -0
- package/dist/components/message-item/message-item-toolbar.mjs +131 -0
- package/dist/components/message-item/message-item.recipe.d.mts +101 -0
- package/dist/components/message-item/message-item.recipe.mjs +114 -0
- package/dist/components/message-item/message-multi-select.d.mts +15 -0
- package/dist/components/message-item/message-multi-select.mjs +49 -0
- package/dist/components/message-item/message-multi-select.recipe.mjs +23 -0
- package/dist/components/message-item/message-reaction.d.mts +39 -0
- package/dist/components/message-item/message-reaction.mjs +188 -0
- package/dist/components/message-item/message-reaction.recipe.mjs +76 -0
- package/dist/components/message-item/message-reference.d.mts +50 -0
- package/dist/components/message-item/message-reference.mjs +111 -0
- package/dist/components/message-item/message-reference.recipe.d.mts +6 -0
- package/dist/components/message-item/message-reference.recipe.mjs +63 -0
- package/dist/components/message-item/message-text-selection-toolbar.d.mts +24 -0
- package/dist/components/message-item/message-text-selection-toolbar.mjs +13 -0
- package/dist/components/message-list/index.d.mts +4 -0
- package/dist/components/message-list/message-list-jump.d.mts +21 -0
- package/dist/components/message-list/message-list-jump.mjs +73 -0
- package/dist/components/message-list/message-list-markers.d.mts +13 -0
- package/dist/components/message-list/message-list-markers.mjs +70 -0
- package/dist/components/message-list/message-list.d.mts +7 -0
- package/dist/components/message-list/message-list.mjs +52 -0
- package/dist/components/message-list/message-list.recipe.mjs +54 -0
- package/dist/components/message-quoted-preview/index.d.mts +2 -0
- package/dist/components/message-quoted-preview/message-quoted-preview.d.mts +40 -0
- package/dist/components/message-quoted-preview/message-quoted-preview.mjs +144 -0
- package/dist/components/message-quoted-preview/message-quoted-preview.recipe.mjs +38 -0
- package/dist/components/message-replies/index.d.mts +2 -0
- package/dist/components/message-replies/message-replies.d.mts +17 -0
- package/dist/components/message-replies/message-replies.mjs +79 -0
- package/dist/components/message-replies/message-replies.recipe.mjs +25 -0
- package/dist/components/message-translation/index.d.mts +2 -0
- package/dist/components/message-translation/message-translation.d.mts +20 -0
- package/dist/components/message-translation/message-translation.mjs +64 -0
- package/dist/components/message-translation/message-translation.recipe.mjs +27 -0
- package/dist/components/meter/index.d.mts +2 -0
- package/dist/components/meter/meter.d.mts +107 -0
- package/dist/components/meter/meter.mjs +118 -0
- package/dist/components/mobile-nav/index.d.mts +3 -0
- package/dist/components/mobile-nav/mobile-nav-server.d.mts +71 -0
- package/dist/components/mobile-nav/mobile-nav-server.mjs +287 -0
- package/dist/components/mobile-nav/mobile-nav.d.mts +12 -0
- package/dist/components/mobile-nav/mobile-nav.mjs +73 -0
- package/dist/components/mode-bar/index.d.mts +2 -0
- package/dist/components/mode-bar/mode-bar.d.mts +33 -0
- package/dist/components/mode-bar/mode-bar.mjs +115 -0
- package/dist/components/notification-center/index.d.mts +2 -0
- package/dist/components/notification-center/notification-center.d.mts +225 -0
- package/dist/components/notification-center/notification-center.mjs +340 -0
- package/dist/components/panel/index.d.mts +7 -0
- package/dist/components/panel/panel-action.d.mts +15 -0
- package/dist/components/panel/panel-action.mjs +23 -0
- package/dist/components/panel/panel-action.recipe.mjs +40 -0
- package/dist/components/panel/panel-header.d.mts +34 -0
- package/dist/components/panel/panel-header.mjs +135 -0
- package/dist/components/panel/panel-header.recipe.mjs +78 -0
- package/dist/components/panel/panel-notice.d.mts +16 -0
- package/dist/components/panel/panel-notice.mjs +77 -0
- package/dist/components/panel/panel-split-action.d.mts +34 -0
- package/dist/components/panel/panel-split-action.mjs +69 -0
- package/dist/components/panel/panel-split-action.recipe.mjs +53 -0
- package/dist/components/panel/panel-toggle-action.d.mts +6 -0
- package/dist/components/panel/panel-toggle-action.mjs +15 -0
- package/dist/components/panel/panel.d.mts +25 -0
- package/dist/components/panel/panel.mjs +96 -0
- package/dist/components/panel/panel.recipe.mjs +24 -0
- package/dist/components/picker-trigger-button/index.d.mts +2 -0
- package/dist/components/picker-trigger-button/picker-trigger-button.d.mts +7 -0
- package/dist/components/picker-trigger-button/picker-trigger-button.mjs +36 -0
- package/dist/components/popover/index.d.mts +2 -0
- package/dist/components/popover/popover.d.mts +41 -0
- package/dist/components/popover/popover.mjs +184 -0
- package/dist/components/preview-card/index.d.mts +2 -0
- package/dist/components/preview-card/preview-card.d.mts +43 -0
- package/dist/components/preview-card/preview-card.mjs +197 -0
- package/dist/components/profile-panel/index.d.mts +2 -0
- package/dist/components/profile-panel/profile-panel.d.mts +14 -0
- package/dist/components/profile-panel/profile-panel.mjs +46 -0
- package/dist/components/profile-panel/profile-panel.recipe.mjs +14 -0
- package/dist/components/progress/index.d.mts +2 -0
- package/dist/components/progress/progress.d.mts +119 -0
- package/dist/components/progress/progress.mjs +139 -0
- package/dist/components/pull-to-refresh/index.d.mts +4 -0
- package/dist/components/pull-to-refresh/pull-to-refresh-gesture.d.mts +30 -0
- package/dist/components/pull-to-refresh/pull-to-refresh-gesture.mjs +134 -0
- package/dist/components/pull-to-refresh/pull-to-refresh-indicator.d.mts +21 -0
- package/dist/components/pull-to-refresh/pull-to-refresh-indicator.mjs +153 -0
- package/dist/components/pull-to-refresh/pull-to-refresh-material-progress.mjs +150 -0
- package/dist/components/pull-to-refresh/use-pull-to-refresh.d.mts +55 -0
- package/dist/components/pull-to-refresh/use-pull-to-refresh.mjs +156 -0
- package/dist/components/radio-group/index.d.mts +2 -0
- package/dist/components/radio-group/radio-group.d.mts +14 -0
- package/dist/components/radio-group/radio-group.mjs +59 -0
- package/dist/components/resizable/index.d.mts +2 -0
- package/dist/components/resizable/resizable.d.mts +15 -0
- package/dist/components/resizable/resizable.mjs +39 -0
- package/dist/components/resizable/resizable.recipe.mjs +24 -0
- package/dist/components/scroll-area/index.d.mts +2 -0
- package/dist/components/scroll-area/scroll-area.d.mts +17 -0
- package/dist/components/scroll-area/scroll-area.mjs +55 -0
- package/dist/components/scroll-area/scroll-area.recipe.mjs +23 -0
- package/dist/components/search/index.d.mts +6 -0
- package/dist/components/search/search-entity.d.mts +24 -0
- package/dist/components/search/search-entity.mjs +106 -0
- package/dist/components/search/search-entity.recipe.mjs +41 -0
- package/dist/components/search/search-message.d.mts +25 -0
- package/dist/components/search/search-message.mjs +115 -0
- package/dist/components/search/search-message.recipe.mjs +32 -0
- package/dist/components/search/search-thread.d.mts +17 -0
- package/dist/components/search/search-thread.mjs +79 -0
- package/dist/components/search/search-thread.recipe.mjs +16 -0
- package/dist/components/search/search-trigger.d.mts +15 -0
- package/dist/components/search/search-trigger.mjs +59 -0
- package/dist/components/search/search.d.mts +23 -0
- package/dist/components/search/search.mjs +88 -0
- package/dist/components/search/search.recipe.mjs +22 -0
- package/dist/components/segmented-control/index.d.mts +2 -0
- package/dist/components/segmented-control/segmented-control.d.mts +38 -0
- package/dist/components/segmented-control/segmented-control.mjs +306 -0
- package/dist/components/select/index.d.mts +2 -0
- package/dist/components/select/select.d.mts +95 -0
- package/dist/components/select/select.mjs +483 -0
- package/dist/components/separator/index.d.mts +2 -0
- package/dist/components/separator/separator.d.mts +10 -0
- package/dist/components/separator/separator.mjs +49 -0
- package/dist/components/sidebar/index.d.mts +5 -0
- package/dist/components/sidebar/sidebar-item.d.mts +64 -0
- package/dist/components/sidebar/sidebar-item.mjs +201 -0
- package/dist/components/sidebar/sidebar-item.recipe.mjs +100 -0
- package/dist/components/sidebar/sidebar-menu.d.mts +13 -0
- package/dist/components/sidebar/sidebar-menu.mjs +67 -0
- package/dist/components/sidebar/sidebar-menu.recipe.mjs +22 -0
- package/dist/components/sidebar/sidebar-section.d.mts +41 -0
- package/dist/components/sidebar/sidebar-section.mjs +164 -0
- package/dist/components/sidebar/sidebar-section.recipe.mjs +45 -0
- package/dist/components/sidebar/sidebar.d.mts +17 -0
- package/dist/components/sidebar/sidebar.mjs +149 -0
- package/dist/components/sidebar/sidebar.recipe.mjs +37 -0
- package/dist/components/skeleton/index.d.mts +2 -0
- package/dist/components/skeleton/skeleton.d.mts +50 -0
- package/dist/components/skeleton/skeleton.mjs +29 -0
- package/dist/components/spinner/index.d.mts +2 -0
- package/dist/components/spinner/spinner.d.mts +77 -0
- package/dist/components/spinner/spinner.mjs +118 -0
- package/dist/components/status/index.d.mts +2 -0
- package/dist/components/status/status.d.mts +143 -0
- package/dist/components/status/status.mjs +56 -0
- package/dist/components/steps/index.d.mts +3 -0
- package/dist/components/steps/otter-indicator.d.mts +17 -0
- package/dist/components/steps/otter-indicator.mjs +331 -0
- package/dist/components/steps/steps.d.mts +50 -0
- package/dist/components/steps/steps.mjs +174 -0
- package/dist/components/switch/index.d.mts +2 -0
- package/dist/components/switch/switch.d.mts +9 -0
- package/dist/components/switch/switch.mjs +50 -0
- package/dist/components/system-message/index.d.mts +2 -0
- package/dist/components/system-message/system-message.d.mts +27 -0
- package/dist/components/system-message/system-message.mjs +113 -0
- package/dist/components/system-message/system-message.recipe.mjs +34 -0
- package/dist/components/table/index.d.mts +2 -0
- package/dist/components/table/table.d.mts +35 -0
- package/dist/components/table/table.mjs +102 -0
- package/dist/components/table/table.recipe.mjs +31 -0
- package/dist/components/tabs/index.d.mts +2 -0
- package/dist/components/tabs/tabs.d.mts +185 -0
- package/dist/components/tabs/tabs.mjs +528 -0
- package/dist/components/task-board/index.d.mts +2 -0
- package/dist/components/task-board/task-board-column.recipe.mjs +46 -0
- package/dist/components/task-board/task-board.d.mts +40 -0
- package/dist/components/task-board/task-board.mjs +155 -0
- package/dist/components/task-card/index.d.mts +2 -0
- package/dist/components/task-card/task-card-status.recipe.mjs +17 -0
- package/dist/components/task-card/task-card.d.mts +30 -0
- package/dist/components/task-card/task-card.mjs +141 -0
- package/dist/components/task-card/task-card.recipe.mjs +39 -0
- package/dist/components/task-dnd/index.d.mts +2 -0
- package/dist/components/task-dnd/task-dnd.d.mts +75 -0
- package/dist/components/task-dnd/task-dnd.mjs +341 -0
- package/dist/components/task-dnd/task-dnd.recipe.mjs +20 -0
- package/dist/components/task-list/index.d.mts +2 -0
- package/dist/components/task-list/task-list-section.recipe.mjs +37 -0
- package/dist/components/task-list/task-list.d.mts +34 -0
- package/dist/components/task-list/task-list.mjs +119 -0
- package/dist/components/tasks/index.d.mts +7 -0
- package/dist/components/tasks/task-chip.d.mts +14 -0
- package/dist/components/tasks/task-chip.mjs +81 -0
- package/dist/components/tasks/task-loading.d.mts +7 -0
- package/dist/components/tasks/task-loading.mjs +32 -0
- package/dist/components/tasks/task-loading.recipe.mjs +8 -0
- package/dist/components/tasks/task-status-badge.d.mts +24 -0
- package/dist/components/tasks/task-status-badge.mjs +24 -0
- package/dist/components/tasks/task-status-icon.d.mts +13 -0
- package/dist/components/tasks/task-status-icon.mjs +90 -0
- package/dist/components/tasks/task-status.recipe.d.mts +62 -0
- package/dist/components/tasks/task-status.recipe.mjs +33 -0
- package/dist/components/tasks/tasks-panel.d.mts +22 -0
- package/dist/components/tasks/tasks-panel.mjs +114 -0
- package/dist/components/tasks/tasks-panel.recipe.mjs +36 -0
- package/dist/components/text/index.d.mts +2 -0
- package/dist/components/text/text.d.mts +186 -0
- package/dist/components/text/text.mjs +114 -0
- package/dist/components/text-link/index.d.mts +2 -0
- package/dist/components/text-link/text-link.d.mts +36 -0
- package/dist/components/text-link/text-link.mjs +60 -0
- package/dist/components/text-selection-toolbar/index.d.mts +3 -0
- package/dist/components/text-selection-toolbar/text-selection-anchor.d.mts +22 -0
- package/dist/components/text-selection-toolbar/text-selection-anchor.mjs +106 -0
- package/dist/components/text-selection-toolbar/text-selection-toolbar.d.mts +20 -0
- package/dist/components/text-selection-toolbar/text-selection-toolbar.mjs +41 -0
- package/dist/components/text-selection-toolbar/text-selection-toolbar.recipe.mjs +19 -0
- package/dist/components/textarea/index.d.mts +2 -0
- package/dist/components/textarea/textarea.d.mts +16 -0
- package/dist/components/textarea/textarea.mjs +62 -0
- package/dist/components/thread-panel/index.d.mts +2 -0
- package/dist/components/thread-panel/thread-panel.d.mts +31 -0
- package/dist/components/thread-panel/thread-panel.mjs +162 -0
- package/dist/components/thread-panel/thread-panel.recipe.mjs +36 -0
- package/dist/components/timeline/index.d.mts +2 -0
- package/dist/components/timeline/timeline.d.mts +44 -0
- package/dist/components/timeline/timeline.mjs +81 -0
- package/dist/components/toast/index.d.mts +2 -0
- package/dist/components/toast/toast.d.mts +263 -0
- package/dist/components/toast/toast.mjs +556 -0
- package/dist/components/toggle-group/index.d.mts +2 -0
- package/dist/components/toggle-group/toggle-group.d.mts +15 -0
- package/dist/components/toggle-group/toggle-group.mjs +64 -0
- package/dist/components/tooltip/index.d.mts +2 -0
- package/dist/components/tooltip/tooltip.d.mts +18 -0
- package/dist/components/tooltip/tooltip.mjs +197 -0
- package/dist/components/virtual-list/ItemColumns.mjs +37 -0
- package/dist/components/virtual-list/VirtualList.d.mts +4 -0
- package/dist/components/virtual-list/VirtualList.mjs +1401 -0
- package/dist/components/virtual-list/VirtualListContext.mjs +5 -0
- package/dist/components/virtual-list/hooks/use-event-callback.mjs +10 -0
- package/dist/components/virtual-list/hooks/use-ios-momentum-compensation.mjs +148 -0
- package/dist/components/virtual-list/hooks/use-keyboard-scroll.mjs +42 -0
- package/dist/components/virtual-list/hooks/use-latest-ref.mjs +10 -0
- package/dist/components/virtual-list/hooks/use-layout-effect-with-previous.mjs +16 -0
- package/dist/components/virtual-list/hooks/use-memo-with-previous.mjs +22 -0
- package/dist/components/virtual-list/hooks/use-non-passive-wheel.mjs +23 -0
- package/dist/components/virtual-list/hooks/use-non-virtual-content-resize.mjs +28 -0
- package/dist/components/virtual-list/hooks/use-scroll-anchor.mjs +55 -0
- package/dist/components/virtual-list/index.d.mts +5 -0
- package/dist/components/virtual-list/public-types.d.mts +341 -0
- package/dist/components/virtual-list/resize-observer/ResizeObserverWrapper.d.mts +5 -0
- package/dist/components/virtual-list/resize-observer/ResizeObserverWrapper.mjs +70 -0
- package/dist/components/virtual-list/resize-observer/resize-observer-delegate.d.mts +6 -0
- package/dist/components/virtual-list/resize-observer/resize-observer-delegate.mjs +54 -0
- package/dist/components/virtual-list/utils/align.mjs +19 -0
- package/dist/components/virtual-list/utils/constants.mjs +30 -0
- package/dist/components/virtual-list/utils/fenwick-tree.mjs +66 -0
- package/dist/components/virtual-list/utils/items-anchor.mjs +49 -0
- package/dist/components/virtual-list/utils/measure.mjs +77 -0
- package/dist/components/virtual-list/utils/platform.mjs +39 -0
- package/dist/components/virtual-list/utils/range.mjs +103 -0
- package/dist/components/virtual-list/utils/size-cache.mjs +35 -0
- package/dist/components/workspace-button/index.d.mts +2 -0
- package/dist/components/workspace-button/workspace-button.d.mts +9 -0
- package/dist/components/workspace-button/workspace-button.mjs +28 -0
- package/dist/index.d.mts +239 -4864
- package/dist/index.mjs +142 -17054
- package/dist/lib/chip-remove.mjs +17 -0
- package/dist/lib/data-attributes.d.mts +5 -0
- package/dist/lib/decision-width.mjs +9 -0
- package/dist/lib/default-native-button.mjs +8 -0
- package/dist/lib/desktop-media.mjs +10 -0
- package/dist/lib/drag-escape.mjs +37 -0
- package/dist/lib/frame-insets.mjs +127 -0
- package/dist/lib/head-edges.mjs +44 -0
- package/dist/lib/hud-text-action.mjs +10 -0
- package/dist/lib/inline-chip.mjs +30 -0
- package/dist/lib/input-modality.d.mts +36 -0
- package/dist/lib/input-modality.mjs +186 -0
- package/dist/lib/list-cell.mjs +21 -0
- package/dist/lib/located.d.mts +25 -0
- package/dist/lib/located.mjs +28 -0
- package/dist/lib/overlay-depth.d.mts +42 -0
- package/dist/lib/overlay-depth.mjs +59 -0
- package/dist/lib/phone-media.mjs +24 -0
- package/dist/lib/presence.d.mts +16 -0
- package/dist/lib/presence.mjs +16 -0
- package/dist/lib/row-tone.d.mts +8 -0
- package/dist/lib/search-hit.mjs +18 -0
- package/dist/lib/stacked-actions.mjs +112 -0
- package/dist/lib/styled-props.d.mts +15 -0
- package/dist/lib/tap-activation.mjs +133 -0
- package/dist/lib/theme/theme-context.d.mts +10 -0
- package/dist/lib/theme/theme-context.mjs +9 -0
- package/dist/lib/theme/theme-provider.d.mts +23 -0
- package/dist/lib/theme/theme-provider.mjs +61 -0
- package/dist/lib/theme/theme-scope.mjs +19 -0
- package/dist/lib/theme/use-theme.d.mts +5 -0
- package/dist/lib/theme/use-theme.mjs +9 -0
- package/dist/lib/touch-drag.d.mts +55 -0
- package/dist/lib/touch-drag.mjs +151 -0
- package/dist/lib/truncation.d.mts +26 -0
- package/dist/lib/truncation.mjs +153 -0
- package/dist/lib/tv.d.mts +2 -0
- package/dist/lib/tv.mjs +14 -0
- package/dist/lib/use-copy-to-clipboard.mjs +58 -0
- package/dist/lib/use-merged-ref.mjs +60 -0
- package/dist/lib/use-mobile-viewport.mjs +17 -0
- package/dist/lib/use-overflow-title.mjs +49 -0
- package/dist/lib/use-scrollbar-size.d.mts +16 -0
- package/dist/lib/use-scrollbar-size.mjs +46 -0
- package/dist/lib/use-truncated.d.mts +20 -0
- package/dist/lib/use-truncated.mjs +34 -0
- package/dist/lib/without-children.d.mts +8 -0
- package/dist/wip.d.mts +61 -1190
- package/dist/wip.mjs +43 -2970
- package/package.json +8 -1
- package/dist/index-C3ymUW98.d.mts +0 -1816
- package/dist/mode-bar-tGnYByXp.mjs +0 -7564
- package/dist/style.css +0 -1395
|
@@ -0,0 +1,483 @@
|
|
|
1
|
+
import { tv } from "../../lib/tv.mjs";
|
|
2
|
+
import { useThemeScopeProps } from "../../lib/theme/theme-scope.mjs";
|
|
3
|
+
import { Button } from "../button/button.mjs";
|
|
4
|
+
import { usePopupCollisionPadding } from "../../lib/frame-insets.mjs";
|
|
5
|
+
import { useOverflowTitle } from "../../lib/use-overflow-title.mjs";
|
|
6
|
+
import { Check, ChevronDown } from "lucide-react";
|
|
7
|
+
import { createContext, useCallback, useContext, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
import { Select } from "@base-ui/react/select";
|
|
10
|
+
//#region src/components/select/select.tsx
|
|
11
|
+
const select = tv({
|
|
12
|
+
slots: {
|
|
13
|
+
trigger: [
|
|
14
|
+
"inline-flex select-none items-center justify-between",
|
|
15
|
+
"outline-none transition-colors",
|
|
16
|
+
"data-invalid:focus-visible:ring-[color-mix(in_oklch,var(--danger)_60%,transparent)]",
|
|
17
|
+
"**:data-[slot='button-content']:w-full **:data-[slot='button-content']:justify-between",
|
|
18
|
+
"[&>span[data-slot='select-trigger-content']]:min-w-0 [&>span[data-slot='select-trigger-content']]:flex-1",
|
|
19
|
+
"[&_[data-slot='select-trigger-content']_svg]:shrink-0",
|
|
20
|
+
"h-control w-full gap-2 pr-3 pl-3.5",
|
|
21
|
+
"border-[1.5px] border-line-field",
|
|
22
|
+
"hover:bg-none",
|
|
23
|
+
"text-subhead font-semibold text-foreground",
|
|
24
|
+
"data-placeholder:font-medium data-placeholder:text-foreground-hint",
|
|
25
|
+
"data-invalid:border-danger-strong data-invalid:hover:border-danger-strong",
|
|
26
|
+
"data-invalid:focus-visible:border-danger-strong data-invalid:focus-visible:ring-0",
|
|
27
|
+
"[&_[data-slot='select-trigger-content']_svg:not([class*='size-'])]:size-4",
|
|
28
|
+
"[&_[data-slot='select-trigger-content']_svg:not([class*='stroke-'])]:stroke-2"
|
|
29
|
+
],
|
|
30
|
+
icon: [
|
|
31
|
+
"ml-auto flex shrink-0 items-center justify-center transition-transform",
|
|
32
|
+
"[&>svg]:shrink-0",
|
|
33
|
+
"text-foreground-hint opacity-100",
|
|
34
|
+
"[&>svg]:size-4 [&>svg]:stroke-2 [&>svg_*]:stroke-2"
|
|
35
|
+
],
|
|
36
|
+
value: ["flex min-w-0 flex-1 truncate text-left"],
|
|
37
|
+
positioner: ["isolate z-50 outline-none"],
|
|
38
|
+
content: [
|
|
39
|
+
"relative max-h-(--available-height) min-w-[max(var(--anchor-width),220px)] overflow-hidden",
|
|
40
|
+
"max-w-[min(var(--available-width),max(var(--anchor-width),24rem))]",
|
|
41
|
+
"outline-none",
|
|
42
|
+
"rounded-container bg-layer-popover p-1 text-foreground",
|
|
43
|
+
"shadow-float ring-1 ring-line-seam"
|
|
44
|
+
],
|
|
45
|
+
list: ["max-h-64 overflow-y-auto overscroll-contain scroll-py-6", "flex flex-col"],
|
|
46
|
+
item: [
|
|
47
|
+
"flex w-full shrink-0 cursor-default select-none items-center justify-between overflow-hidden",
|
|
48
|
+
"text-left outline-none transition-colors",
|
|
49
|
+
"min-h-option flex-wrap gap-x-2.5 gap-y-0.5 rounded-chip px-2.5 py-option-inset",
|
|
50
|
+
"text-callout font-medium text-foreground",
|
|
51
|
+
"bg-transparent hover:bg-brand-soft data-highlighted:bg-brand-soft",
|
|
52
|
+
"data-selected:font-bold data-selected:**:data-[slot='select-item-text']:font-bold",
|
|
53
|
+
"data-disabled:pointer-events-none data-disabled:text-foreground-disabled",
|
|
54
|
+
"[&>svg]:pointer-events-none [&>svg]:shrink-0 [&>svg]:text-foreground-muted",
|
|
55
|
+
"[&>svg:not([class*='size-'])]:size-4",
|
|
56
|
+
"[&>svg:not([class*='stroke-'])]:stroke-2"
|
|
57
|
+
],
|
|
58
|
+
actionItem: [
|
|
59
|
+
"flex w-full shrink-0 cursor-default select-none items-center gap-2.5 overflow-hidden",
|
|
60
|
+
"text-left outline-none transition-colors",
|
|
61
|
+
"min-h-option rounded-chip px-2.5 py-option-inset",
|
|
62
|
+
"text-callout font-medium text-foreground-muted",
|
|
63
|
+
"bg-transparent hover:bg-brand-soft data-highlighted:bg-brand-soft",
|
|
64
|
+
"data-disabled:pointer-events-none data-disabled:text-foreground-disabled",
|
|
65
|
+
"[&>svg]:pointer-events-none [&>svg]:shrink-0",
|
|
66
|
+
"[&>svg:not([class*='size-'])]:size-4",
|
|
67
|
+
"[&>svg:not([class*='stroke-'])]:stroke-2"
|
|
68
|
+
],
|
|
69
|
+
itemLeading: [
|
|
70
|
+
"flex shrink-0 items-center justify-center",
|
|
71
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
72
|
+
"size-4 text-foreground-muted",
|
|
73
|
+
"[&>svg]:pointer-events-none [&>svg]:shrink-0",
|
|
74
|
+
"[&>svg:not([class*='size-'])]:size-4",
|
|
75
|
+
"[&>svg:not([class*='stroke-'])]:stroke-2"
|
|
76
|
+
],
|
|
77
|
+
itemIndicator: ["pointer-events-none ml-auto flex shrink-0 items-center justify-center", "text-foreground [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:stroke-2 [&>svg_*]:stroke-2"],
|
|
78
|
+
itemText: ["min-w-0 flex-1 line-clamp-2 wrap-anywhere"],
|
|
79
|
+
itemDescription: [
|
|
80
|
+
"order-last min-w-0 basis-full wrap-anywhere",
|
|
81
|
+
"[[data-slot=select-item-leading]~&]:ps-[calc(--spacing(4)+(--spacing(2.5)))]",
|
|
82
|
+
"font-sans text-caption font-normal text-foreground-hint"
|
|
83
|
+
],
|
|
84
|
+
label: ["m-0", "font-sans text-footnote font-semibold text-foreground-muted"],
|
|
85
|
+
group: ["flex flex-col"],
|
|
86
|
+
groupLabel: ["py-2", "px-2.5 pt-2 pb-1 text-caption font-bold text-foreground-hint"],
|
|
87
|
+
separator: ["h-px shrink-0 border-0", "-mx-1 my-1 bg-line-hairline"],
|
|
88
|
+
scrollArrow: [
|
|
89
|
+
"absolute inset-x-0 z-10 flex h-6 w-full cursor-default items-center justify-center",
|
|
90
|
+
"outline-none transition-colors",
|
|
91
|
+
"data-[direction=up]:top-0 data-[direction=down]:bottom-0",
|
|
92
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
93
|
+
"bg-layer-popover text-foreground-hint"
|
|
94
|
+
],
|
|
95
|
+
empty: ["px-2.5 py-2 text-left text-callout text-foreground-hint"]
|
|
96
|
+
},
|
|
97
|
+
variants: { chrome: {
|
|
98
|
+
default: {},
|
|
99
|
+
field: {
|
|
100
|
+
trigger: [
|
|
101
|
+
"px-3 text-field font-field",
|
|
102
|
+
"**:data-[slot='button-content']:font-field **:data-[slot='select-value']:font-field",
|
|
103
|
+
"h-control py-0",
|
|
104
|
+
"data-placeholder:font-field"
|
|
105
|
+
],
|
|
106
|
+
item: ["text-field font-field", "**:data-[slot='select-item-text']:font-field"],
|
|
107
|
+
actionItem: ["text-field font-field"]
|
|
108
|
+
}
|
|
109
|
+
} },
|
|
110
|
+
defaultVariants: { chrome: "default" }
|
|
111
|
+
});
|
|
112
|
+
/**
|
|
113
|
+
* Declared once on the root and read by both the trigger and the popup.
|
|
114
|
+
*
|
|
115
|
+
* The popup renders through a portal, so it has no DOM ancestor in common with
|
|
116
|
+
* its trigger. React context follows the component tree rather than the DOM,
|
|
117
|
+
* so both ends read one source instead of each resolving its own — which is
|
|
118
|
+
* what lets a Select keep the same typography whether its content mounts at the
|
|
119
|
+
* document root or into a `portalProps.container`.
|
|
120
|
+
*
|
|
121
|
+
* Deliberately NOT a prop on the trigger and another on the content: that shape
|
|
122
|
+
* asks every callsite to restate the decision, which is exactly the duplication
|
|
123
|
+
* this variant exists to remove.
|
|
124
|
+
*/
|
|
125
|
+
const SelectChromeContext = createContext("default");
|
|
126
|
+
function useSelectChrome() {
|
|
127
|
+
return useContext(SelectChromeContext);
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* The value a `SelectActionItem` gives Base UI, so the row joins the list's
|
|
131
|
+
* navigation and typeahead like any item. The root recognises it and never lets
|
|
132
|
+
* it become the value: a list action changes what the list shows, never what is
|
|
133
|
+
* chosen.
|
|
134
|
+
*/
|
|
135
|
+
var SelectActionValue = class {
|
|
136
|
+
onActionRef;
|
|
137
|
+
closeOnActionRef;
|
|
138
|
+
constructor(onActionRef, closeOnActionRef) {
|
|
139
|
+
this.onActionRef = onActionRef;
|
|
140
|
+
this.closeOnActionRef = closeOnActionRef;
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
function findActionValue(value) {
|
|
144
|
+
if (value instanceof SelectActionValue) return value;
|
|
145
|
+
if (Array.isArray(value)) return value.find((entry) => entry instanceof SelectActionValue);
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Base UI keeps the highlight by position. When an action adds items above its
|
|
149
|
+
* row, the same position then holds another item while focus stays on the row,
|
|
150
|
+
* and the next arrow key starts from the wrong place. Once the list has
|
|
151
|
+
* re-rendered, focus the list and then the row again: the row's focus handler
|
|
152
|
+
* re-reads its position and moves the highlight back to it.
|
|
153
|
+
*/
|
|
154
|
+
function keepActionHighlighted(event) {
|
|
155
|
+
const target = event.target;
|
|
156
|
+
if (!(target instanceof Element)) return;
|
|
157
|
+
const row = target.closest("[data-slot=\"select-action-item\"]");
|
|
158
|
+
if (!row) return;
|
|
159
|
+
requestAnimationFrame(() => {
|
|
160
|
+
if (!row.isConnected || row.hasAttribute("data-highlighted")) return;
|
|
161
|
+
row.closest("[role=\"listbox\"]")?.focus({ preventScroll: true });
|
|
162
|
+
row.focus({ preventScroll: true });
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
function Select$1({ chrome = "default", onValueChange, onOpenChange, isItemEqualToValue, itemToStringLabel, itemToStringValue, ...props }) {
|
|
166
|
+
const pendingActionClose = useRef(void 0);
|
|
167
|
+
const handleValueChange = useCallback((next, details) => {
|
|
168
|
+
const action = findActionValue(next);
|
|
169
|
+
if (!action) {
|
|
170
|
+
pendingActionClose.current = void 0;
|
|
171
|
+
onValueChange?.(next, details);
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
details.cancel();
|
|
175
|
+
if (details.reason !== "item-press") return;
|
|
176
|
+
pendingActionClose.current = action.closeOnActionRef.current;
|
|
177
|
+
action.onActionRef.current?.(details.event);
|
|
178
|
+
if (!action.closeOnActionRef.current) keepActionHighlighted(details.event);
|
|
179
|
+
}, [onValueChange]);
|
|
180
|
+
const handleOpenChange = useCallback((open, details) => {
|
|
181
|
+
const closeOnAction = pendingActionClose.current;
|
|
182
|
+
pendingActionClose.current = void 0;
|
|
183
|
+
if (!open && details.reason === "item-press" && closeOnAction === false) {
|
|
184
|
+
details.cancel();
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
onOpenChange?.(open, details);
|
|
188
|
+
}, [onOpenChange]);
|
|
189
|
+
const handleItemEquality = useMemo(() => isItemEqualToValue && ((item, value) => item instanceof SelectActionValue || value instanceof SelectActionValue ? Object.is(item, value) : isItemEqualToValue(item, value)), [isItemEqualToValue]);
|
|
190
|
+
const handleStringLabel = useMemo(() => itemToStringLabel && ((item) => item instanceof SelectActionValue ? "" : itemToStringLabel(item)), [itemToStringLabel]);
|
|
191
|
+
const handleStringValue = useMemo(() => itemToStringValue && ((item) => item instanceof SelectActionValue ? "" : itemToStringValue(item)), [itemToStringValue]);
|
|
192
|
+
return /* @__PURE__ */ jsx(SelectChromeContext, {
|
|
193
|
+
value: chrome,
|
|
194
|
+
children: /* @__PURE__ */ jsx(Select.Root, {
|
|
195
|
+
"data-slot": "select",
|
|
196
|
+
"data-chrome": chrome,
|
|
197
|
+
onValueChange: handleValueChange,
|
|
198
|
+
onOpenChange: handleOpenChange,
|
|
199
|
+
isItemEqualToValue: handleItemEquality,
|
|
200
|
+
itemToStringLabel: handleStringLabel,
|
|
201
|
+
itemToStringValue: handleStringValue,
|
|
202
|
+
...props
|
|
203
|
+
})
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
function SelectTrigger({ className, children, render, "data-invalid": dataInvalid, ...props }) {
|
|
207
|
+
const chrome = useSelectChrome();
|
|
208
|
+
const { trigger } = select({ chrome });
|
|
209
|
+
return /* @__PURE__ */ jsx(Select.Trigger, {
|
|
210
|
+
"data-slot": "select-trigger",
|
|
211
|
+
render: render ?? /* @__PURE__ */ jsx(Button, {
|
|
212
|
+
variant: "outline",
|
|
213
|
+
size: "md",
|
|
214
|
+
className: trigger({ className })
|
|
215
|
+
}),
|
|
216
|
+
...props,
|
|
217
|
+
"data-invalid": dataInvalid || void 0,
|
|
218
|
+
"aria-invalid": dataInvalid ? "true" : void 0,
|
|
219
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
220
|
+
"data-slot": "select-trigger-content",
|
|
221
|
+
"data-picker-trigger-content": "select",
|
|
222
|
+
className: "flex min-w-0 flex-1 items-center gap-1.5",
|
|
223
|
+
children
|
|
224
|
+
})
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
function SelectValue({ className, ref, title, ...props }) {
|
|
228
|
+
const { value } = select();
|
|
229
|
+
const overflowRef = useOverflowTitle(ref, title);
|
|
230
|
+
return /* @__PURE__ */ jsx(Select.Value, {
|
|
231
|
+
ref: overflowRef,
|
|
232
|
+
title,
|
|
233
|
+
"data-slot": "select-value",
|
|
234
|
+
className: value({ className }),
|
|
235
|
+
...props
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
function SelectIcon({ className, children, ...props }) {
|
|
239
|
+
const { icon } = select();
|
|
240
|
+
return /* @__PURE__ */ jsx(Select.Icon, {
|
|
241
|
+
"data-slot": "select-icon",
|
|
242
|
+
"data-picker-trigger-indicator": "",
|
|
243
|
+
className: icon({ className }),
|
|
244
|
+
...props,
|
|
245
|
+
children: children ?? /* @__PURE__ */ jsx(ChevronDown, {
|
|
246
|
+
"aria-hidden": true,
|
|
247
|
+
className: "size-3.5 shrink-0"
|
|
248
|
+
})
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
function SelectPortal(props) {
|
|
252
|
+
return /* @__PURE__ */ jsx(Select.Portal, {
|
|
253
|
+
"data-slot": "select-portal",
|
|
254
|
+
...useThemeScopeProps(props)
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
function SelectPopup({ className, ...props }) {
|
|
258
|
+
const { content } = select();
|
|
259
|
+
return /* @__PURE__ */ jsx("div", {
|
|
260
|
+
"data-slot": "select-content",
|
|
261
|
+
className: content({ className }),
|
|
262
|
+
...props
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
function SelectFramePositioner({ collisionPadding, container, ...props }) {
|
|
266
|
+
const padding = usePopupCollisionPadding(collisionPadding, 8, container);
|
|
267
|
+
return /* @__PURE__ */ jsx(Select.Positioner, {
|
|
268
|
+
collisionPadding: padding,
|
|
269
|
+
...props
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
function SelectContent({ align = "start", alignItemWithTrigger = false, alignOffset = 0, anchor, arrowPadding, collisionAvoidance, collisionBoundary, collisionPadding, disableAnchorTracking, positionMethod = "fixed", side = "bottom", sideOffset, sticky, portalProps, className, ...props }) {
|
|
273
|
+
const { positioner, content } = select();
|
|
274
|
+
const positionerNode = /* @__PURE__ */ jsx(SelectFramePositioner, {
|
|
275
|
+
align,
|
|
276
|
+
alignItemWithTrigger,
|
|
277
|
+
alignOffset,
|
|
278
|
+
anchor,
|
|
279
|
+
arrowPadding,
|
|
280
|
+
collisionAvoidance,
|
|
281
|
+
collisionBoundary,
|
|
282
|
+
collisionPadding,
|
|
283
|
+
container: portalProps?.container,
|
|
284
|
+
disableAnchorTracking,
|
|
285
|
+
positionMethod,
|
|
286
|
+
side,
|
|
287
|
+
sideOffset: sideOffset ?? 4,
|
|
288
|
+
sticky,
|
|
289
|
+
className: positioner(),
|
|
290
|
+
children: /* @__PURE__ */ jsx(Select.Popup, {
|
|
291
|
+
"data-slot": "select-content",
|
|
292
|
+
className: content({ className }),
|
|
293
|
+
...props
|
|
294
|
+
})
|
|
295
|
+
});
|
|
296
|
+
return /* @__PURE__ */ jsx(SelectPortal, {
|
|
297
|
+
...portalProps,
|
|
298
|
+
children: positionerNode
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
function SelectList({ className, ...props }) {
|
|
302
|
+
const { list } = select();
|
|
303
|
+
return /* @__PURE__ */ jsx(Select.List, {
|
|
304
|
+
"data-slot": "select-list",
|
|
305
|
+
className: list({ className }),
|
|
306
|
+
...props
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
const SelectItemPartsContext = createContext(null);
|
|
310
|
+
function SelectItem({ className, ...props }) {
|
|
311
|
+
const chrome = useSelectChrome();
|
|
312
|
+
const { item } = select({ chrome });
|
|
313
|
+
const [textId, setTextId] = useState();
|
|
314
|
+
const [descriptionId, setDescriptionId] = useState();
|
|
315
|
+
const parts = useMemo(() => ({
|
|
316
|
+
setTextId,
|
|
317
|
+
setDescriptionId
|
|
318
|
+
}), []);
|
|
319
|
+
return /* @__PURE__ */ jsx(SelectItemPartsContext.Provider, {
|
|
320
|
+
value: parts,
|
|
321
|
+
children: /* @__PURE__ */ jsx(Select.Item, {
|
|
322
|
+
"data-slot": "select-item",
|
|
323
|
+
className: item({ className }),
|
|
324
|
+
"aria-labelledby": descriptionId && textId ? textId : void 0,
|
|
325
|
+
"aria-describedby": descriptionId,
|
|
326
|
+
...props
|
|
327
|
+
})
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
function SelectItemLeading({ className, ...props }) {
|
|
331
|
+
const { itemLeading } = select();
|
|
332
|
+
return /* @__PURE__ */ jsx("span", {
|
|
333
|
+
"data-slot": "select-item-leading",
|
|
334
|
+
className: itemLeading({ className }),
|
|
335
|
+
...props
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
function SelectItemIndicator({ className, children, ...props }) {
|
|
339
|
+
const { itemIndicator } = select();
|
|
340
|
+
const defaultIndicator = /* @__PURE__ */ jsx(Check, {
|
|
341
|
+
"aria-hidden": true,
|
|
342
|
+
className: "size-3 shrink-0"
|
|
343
|
+
});
|
|
344
|
+
return /* @__PURE__ */ jsx(Select.ItemIndicator, {
|
|
345
|
+
"data-slot": "select-item-indicator",
|
|
346
|
+
className: itemIndicator({ className }),
|
|
347
|
+
...props,
|
|
348
|
+
children: children ?? defaultIndicator
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
function SelectItemText({ className, id, ref, title, ...props }) {
|
|
352
|
+
const { itemText } = select();
|
|
353
|
+
const overflowRef = useOverflowTitle(ref, title);
|
|
354
|
+
const generatedId = useId();
|
|
355
|
+
const textId = id ?? generatedId;
|
|
356
|
+
const setTextId = useContext(SelectItemPartsContext)?.setTextId;
|
|
357
|
+
useLayoutEffect(() => {
|
|
358
|
+
setTextId?.(textId);
|
|
359
|
+
return () => setTextId?.(void 0);
|
|
360
|
+
}, [setTextId, textId]);
|
|
361
|
+
return /* @__PURE__ */ jsx(Select.ItemText, {
|
|
362
|
+
ref: overflowRef,
|
|
363
|
+
title,
|
|
364
|
+
id: textId,
|
|
365
|
+
"data-slot": "select-item-text",
|
|
366
|
+
className: itemText({ className }),
|
|
367
|
+
...props
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* A second line under an option's label: what it means, not its name again.
|
|
372
|
+
* It sits beside `SelectItemText`, not inside it, so the selected value in the
|
|
373
|
+
* trigger stays the label alone. The option grows to fit it.
|
|
374
|
+
*/
|
|
375
|
+
function SelectItemDescription({ className, id, ...props }) {
|
|
376
|
+
const { itemDescription } = select();
|
|
377
|
+
const generatedId = useId();
|
|
378
|
+
const descriptionId = id ?? generatedId;
|
|
379
|
+
const setDescriptionId = useContext(SelectItemPartsContext)?.setDescriptionId;
|
|
380
|
+
useLayoutEffect(() => {
|
|
381
|
+
setDescriptionId?.(descriptionId);
|
|
382
|
+
return () => setDescriptionId?.(void 0);
|
|
383
|
+
}, [setDescriptionId, descriptionId]);
|
|
384
|
+
return /* @__PURE__ */ jsx("span", {
|
|
385
|
+
id: descriptionId,
|
|
386
|
+
"data-slot": "select-item-description",
|
|
387
|
+
className: itemDescription({ className }),
|
|
388
|
+
...props
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* An action row inside the list, placed last after a `SelectSeparator`, such as
|
|
393
|
+
* Show All. It is reached by the arrow keys and typeahead like an item, but
|
|
394
|
+
* pressing it runs `onAction` instead of choosing a value. It is an option to
|
|
395
|
+
* assistive technology, so it takes no `aria-expanded`: its label says what it
|
|
396
|
+
* does.
|
|
397
|
+
*/
|
|
398
|
+
function SelectActionItem({ className, onAction, closeOnAction = false, ...props }) {
|
|
399
|
+
const chrome = useSelectChrome();
|
|
400
|
+
const { actionItem } = select({ chrome });
|
|
401
|
+
const onActionRef = useRef(onAction);
|
|
402
|
+
const closeOnActionRef = useRef(closeOnAction);
|
|
403
|
+
useLayoutEffect(() => {
|
|
404
|
+
onActionRef.current = onAction;
|
|
405
|
+
closeOnActionRef.current = closeOnAction;
|
|
406
|
+
}, [onAction, closeOnAction]);
|
|
407
|
+
const [value] = useState(() => new SelectActionValue(onActionRef, closeOnActionRef));
|
|
408
|
+
return /* @__PURE__ */ jsx(Select.Item, {
|
|
409
|
+
"data-slot": "select-action-item",
|
|
410
|
+
className: actionItem({ className }),
|
|
411
|
+
value,
|
|
412
|
+
...props
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
function SelectLabel({ className, ...props }) {
|
|
416
|
+
const { label } = select();
|
|
417
|
+
return /* @__PURE__ */ jsx(Select.Label, {
|
|
418
|
+
"data-slot": "select-label",
|
|
419
|
+
className: label({ className }),
|
|
420
|
+
...props
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
function SelectGroup({ className, ...props }) {
|
|
424
|
+
const { group } = select();
|
|
425
|
+
return /* @__PURE__ */ jsx(Select.Group, {
|
|
426
|
+
"data-slot": "select-group",
|
|
427
|
+
className: group({ className }),
|
|
428
|
+
...props
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
function SelectGroupLabel({ className, ...props }) {
|
|
432
|
+
const { groupLabel } = select();
|
|
433
|
+
return /* @__PURE__ */ jsx(Select.GroupLabel, {
|
|
434
|
+
"data-slot": "select-group-label",
|
|
435
|
+
className: groupLabel({ className }),
|
|
436
|
+
...props
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
function SelectSeparator({ className, ...props }) {
|
|
440
|
+
const { separator } = select();
|
|
441
|
+
return /* @__PURE__ */ jsx("div", {
|
|
442
|
+
role: "separator",
|
|
443
|
+
"aria-orientation": "horizontal",
|
|
444
|
+
"data-slot": "select-separator",
|
|
445
|
+
className: separator({ className }),
|
|
446
|
+
...props
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
function SelectScrollUpArrow({ className, children, ...props }) {
|
|
450
|
+
const { scrollArrow } = select();
|
|
451
|
+
return /* @__PURE__ */ jsx(Select.ScrollUpArrow, {
|
|
452
|
+
"data-slot": "select-scroll-up-arrow",
|
|
453
|
+
"data-direction": "up",
|
|
454
|
+
className: scrollArrow({ className }),
|
|
455
|
+
...props,
|
|
456
|
+
children: children ?? /* @__PURE__ */ jsx(ChevronDown, {
|
|
457
|
+
"aria-hidden": true,
|
|
458
|
+
className: "size-3.5 shrink-0 rotate-180"
|
|
459
|
+
})
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
function SelectScrollDownArrow({ className, children, ...props }) {
|
|
463
|
+
const { scrollArrow } = select();
|
|
464
|
+
return /* @__PURE__ */ jsx(Select.ScrollDownArrow, {
|
|
465
|
+
"data-slot": "select-scroll-down-arrow",
|
|
466
|
+
"data-direction": "down",
|
|
467
|
+
className: scrollArrow({ className }),
|
|
468
|
+
...props,
|
|
469
|
+
children: children ?? /* @__PURE__ */ jsx(ChevronDown, {
|
|
470
|
+
"aria-hidden": true,
|
|
471
|
+
className: "size-3.5 shrink-0"
|
|
472
|
+
})
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
function SelectArrow({ className, ...props }) {
|
|
476
|
+
return /* @__PURE__ */ jsx(Select.Arrow, {
|
|
477
|
+
"data-slot": "select-arrow",
|
|
478
|
+
className,
|
|
479
|
+
...props
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
//#endregion
|
|
483
|
+
export { Select$1 as Select, SelectActionItem, SelectArrow, SelectContent, SelectGroup, SelectGroupLabel, SelectIcon, SelectItem, SelectItemDescription, SelectItemIndicator, SelectItemLeading, SelectItemText, SelectLabel, SelectList, SelectPopup, SelectPortal, SelectScrollDownArrow, SelectScrollUpArrow, SelectSeparator, SelectTrigger, SelectValue, useSelectChrome };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StyledProps } from "../../lib/styled-props.mjs";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
import { Separator } from "@base-ui/react/separator";
|
|
4
|
+
//#region src/components/separator/separator.d.ts
|
|
5
|
+
export type SeparatorProps = StyledProps<Separator.Props> & {
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
declare function Separator$1({ children, className, orientation, ...props }: SeparatorProps): import("react").JSX.Element;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Separator$1 as Separator };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { tv } from "../../lib/tv.mjs";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Separator } from "@base-ui/react/separator";
|
|
4
|
+
//#region src/components/separator/separator.tsx
|
|
5
|
+
const separator = tv({ slots: {
|
|
6
|
+
root: [
|
|
7
|
+
"shrink-0",
|
|
8
|
+
"data-[orientation=horizontal]:w-full",
|
|
9
|
+
"data-[orientation=vertical]:self-stretch",
|
|
10
|
+
"bg-line-hairline",
|
|
11
|
+
"data-[orientation=horizontal]:h-px",
|
|
12
|
+
"data-[orientation=vertical]:w-px"
|
|
13
|
+
],
|
|
14
|
+
labeledRoot: ["grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-3 py-3"],
|
|
15
|
+
labeledLine: ["w-full shrink-0", "h-px bg-line-hairline"],
|
|
16
|
+
labeledContent: ["min-w-0", "font-sans text-footnote font-semibold text-foreground-hint"]
|
|
17
|
+
} });
|
|
18
|
+
function Separator$1({ children, className, orientation = "horizontal", ...props }) {
|
|
19
|
+
const { labeledContent, labeledLine, labeledRoot, root } = separator();
|
|
20
|
+
if (children != null && orientation === "horizontal") return /* @__PURE__ */ jsxs(Separator, {
|
|
21
|
+
"data-slot": "separator",
|
|
22
|
+
orientation,
|
|
23
|
+
className: labeledRoot({ className }),
|
|
24
|
+
...props,
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ jsx("span", {
|
|
27
|
+
"aria-hidden": "true",
|
|
28
|
+
className: labeledLine()
|
|
29
|
+
}),
|
|
30
|
+
/* @__PURE__ */ jsx("span", {
|
|
31
|
+
"data-slot": "separator-content",
|
|
32
|
+
className: labeledContent(),
|
|
33
|
+
children
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ jsx("span", {
|
|
36
|
+
"aria-hidden": "true",
|
|
37
|
+
className: labeledLine()
|
|
38
|
+
})
|
|
39
|
+
]
|
|
40
|
+
});
|
|
41
|
+
return /* @__PURE__ */ jsx(Separator, {
|
|
42
|
+
"data-slot": "separator",
|
|
43
|
+
orientation,
|
|
44
|
+
className: root({ className }),
|
|
45
|
+
...props
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
export { Separator$1 as Separator };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { SidebarBody, SidebarBodyProps, SidebarContent, SidebarContentProps, SidebarGroupLabel, SidebarGroupLabelProps, SidebarHeader, SidebarHeaderProps, SidebarHeaderTitle, SidebarHeaderTitleProps, SidebarLiveActivity, SidebarLiveActivityProps, SidebarRoot, SidebarRootProps } from "./sidebar.mjs";
|
|
2
|
+
import { SidebarMenu, SidebarMenuAside, SidebarMenuAsideProps, SidebarMenuCount, SidebarMenuCountProps, SidebarMenuIcon, SidebarMenuIconProps, SidebarMenuProps, SidebarMenuTitle, SidebarMenuTitleProps } from "./sidebar-menu.mjs";
|
|
3
|
+
import { SidebarItem, SidebarItemAside, SidebarItemAsideProps, SidebarItemChannelIcon, SidebarItemChannelIconProps, SidebarItemContent, SidebarItemContentProps, SidebarItemCount, SidebarItemCountProps, SidebarItemCountSeparator, SidebarItemCountSeparatorProps, SidebarItemIcon, SidebarItemIconProps, SidebarItemIndicator, SidebarItemIndicatorProps, SidebarItemMeta, SidebarItemMetaIcon, SidebarItemMetaIconProps, SidebarItemMetaProps, SidebarItemProps, SidebarItemStatus, SidebarItemStatusProps, SidebarItemSubtitle, SidebarItemSubtitleProps, SidebarItemThreadCount, SidebarItemThreadCountProps, SidebarItemTitle, SidebarItemTitleProps } from "./sidebar-item.mjs";
|
|
4
|
+
import { SidebarControl, SidebarControlProps, SidebarList, SidebarListProps, SidebarSection, SidebarSectionAttention, SidebarSectionAttentionProps, SidebarSectionChevron, SidebarSectionChevronProps, SidebarSectionControl, SidebarSectionControlProps, SidebarSectionControls, SidebarSectionControlsProps, SidebarSectionCount, SidebarSectionCountProps, SidebarSectionDisclosure, SidebarSectionDisclosureProps, SidebarSectionEmpty, SidebarSectionEmptyProps, SidebarSectionHeader, SidebarSectionHeaderProps, SidebarSectionProps, SidebarSectionTitle, SidebarSectionTitleProps, SidebarSectionTrailing, SidebarSectionTrailingProps } from "./sidebar-section.mjs";
|
|
5
|
+
export { SidebarBody, type SidebarBodyProps, SidebarContent, type SidebarContentProps, SidebarControl, type SidebarControlProps, SidebarGroupLabel, type SidebarGroupLabelProps, SidebarHeader, type SidebarHeaderProps, SidebarHeaderTitle, type SidebarHeaderTitleProps, SidebarItem, SidebarItemAside, type SidebarItemAsideProps, SidebarItemChannelIcon, type SidebarItemChannelIconProps, SidebarItemContent, type SidebarItemContentProps, SidebarItemCount, type SidebarItemCountProps, SidebarItemCountSeparator, type SidebarItemCountSeparatorProps, SidebarItemIcon, type SidebarItemIconProps, SidebarItemIndicator, type SidebarItemIndicatorProps, SidebarItemMeta, SidebarItemMetaIcon, type SidebarItemMetaIconProps, type SidebarItemMetaProps, type SidebarItemProps, SidebarItemStatus, type SidebarItemStatusProps, SidebarItemSubtitle, type SidebarItemSubtitleProps, SidebarItemThreadCount, type SidebarItemThreadCountProps, SidebarItemTitle, type SidebarItemTitleProps, SidebarList, type SidebarListProps, SidebarLiveActivity, type SidebarLiveActivityProps, SidebarMenu, SidebarMenuAside, type SidebarMenuAsideProps, SidebarMenuCount, type SidebarMenuCountProps, SidebarMenuIcon, type SidebarMenuIconProps, type SidebarMenuProps, SidebarMenuTitle, type SidebarMenuTitleProps, SidebarRoot, type SidebarRootProps, SidebarSection, SidebarSectionAttention, type SidebarSectionAttentionProps, SidebarSectionChevron, type SidebarSectionChevronProps, SidebarSectionControl, type SidebarSectionControlProps, SidebarSectionControls, type SidebarSectionControlsProps, SidebarSectionCount, type SidebarSectionCountProps, SidebarSectionDisclosure, type SidebarSectionDisclosureProps, SidebarSectionEmpty, type SidebarSectionEmptyProps, SidebarSectionHeader, type SidebarSectionHeaderProps, type SidebarSectionProps, SidebarSectionTitle, type SidebarSectionTitleProps, SidebarSectionTrailing, type SidebarSectionTrailingProps };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { RowTone } from "../../lib/row-tone.mjs";
|
|
2
|
+
import { BadgeProps } from "../badge/badge.mjs";
|
|
3
|
+
import "../badge/index.mjs";
|
|
4
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
5
|
+
//#region src/components/sidebar/sidebar-item.d.ts
|
|
6
|
+
export type SidebarItemRootProps = useRender.ComponentProps<"button"> & {
|
|
7
|
+
active?: boolean;
|
|
8
|
+
/** `false` renders a display-only `div`: no button, no type, nothing to
|
|
9
|
+
* press. Its own controls (an action button) stay the targets. */
|
|
10
|
+
interactive?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type SidebarItemProps = SidebarItemRootProps & {
|
|
13
|
+
/** For a row whose content is two lines (a name and a second line): the row
|
|
14
|
+
* grows from its fixed height and its content aligns to the first line. The
|
|
15
|
+
* name itself stays on one line and truncates, in every group (Sidebar's
|
|
16
|
+
* rules); never use this to let a long name wrap. */
|
|
17
|
+
wrap?: boolean;
|
|
18
|
+
/** Something waits for you (a 700 name), the place is muted (an ink-2
|
|
19
|
+
* name), or it is away: offline or not joined (an ink-3 name). */
|
|
20
|
+
tone?: RowTone;
|
|
21
|
+
};
|
|
22
|
+
export declare function SidebarItem({ className, wrap, tone, interactive, ...props }: SidebarItemProps): import("react").JSX.Element;
|
|
23
|
+
export type SidebarItemIconProps = useRender.ComponentProps<"span">;
|
|
24
|
+
export declare function SidebarItemIcon({ className, render, ...props }: SidebarItemIconProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
25
|
+
export type SidebarItemChannelIconProps = useRender.ComponentProps<"span">;
|
|
26
|
+
export declare function SidebarItemChannelIcon({ className, render, ...props }: SidebarItemChannelIconProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
27
|
+
export type SidebarItemContentProps = useRender.ComponentProps<"span"> & {
|
|
28
|
+
stacked?: boolean;
|
|
29
|
+
};
|
|
30
|
+
export declare function SidebarItemContent({ className, render, stacked, ...props }: SidebarItemContentProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
31
|
+
export type SidebarItemTitleProps = useRender.ComponentProps<"span">;
|
|
32
|
+
export declare function SidebarItemTitle({ className, render, ...props }: SidebarItemTitleProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
33
|
+
export type SidebarItemSubtitleProps = useRender.ComponentProps<"span">;
|
|
34
|
+
export declare function SidebarItemSubtitle({ className, render, ...props }: SidebarItemSubtitleProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
35
|
+
export type SidebarItemMetaProps = useRender.ComponentProps<"span">;
|
|
36
|
+
export declare function SidebarItemMeta({ className, render, ...props }: SidebarItemMetaProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
37
|
+
export type SidebarItemStatusProps = useRender.ComponentProps<"span">;
|
|
38
|
+
export declare function SidebarItemStatus({ className, render, ...props }: SidebarItemStatusProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
39
|
+
/** The yellow @ sticker: someone mentioned you here. */
|
|
40
|
+
export type SidebarItemIndicatorProps = Omit<BadgeProps, "appearance" | "variant">;
|
|
41
|
+
export declare function SidebarItemIndicator({ className, ...props }: SidebarItemIndicatorProps): import("react").JSX.Element;
|
|
42
|
+
export type SidebarItemMetaIconProps = useRender.ComponentProps<"span">;
|
|
43
|
+
export declare function SidebarItemMetaIcon({ className, render, ...props }: SidebarItemMetaIconProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
44
|
+
export type SidebarItemAsideProps = useRender.ComponentProps<"span">;
|
|
45
|
+
export declare function SidebarItemAside({ className, render, ...props }: SidebarItemAsideProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
46
|
+
/** The pink unread count: messages waiting for you. */
|
|
47
|
+
export type SidebarItemCountProps = Omit<BadgeProps, "appearance" | "variant">;
|
|
48
|
+
export declare function SidebarItemCount({ className, ...props }: SidebarItemCountProps): import("react").JSX.Element;
|
|
49
|
+
export type SidebarItemCountSeparatorProps = useRender.ComponentProps<"span">;
|
|
50
|
+
/** The dot between the channel's own unread count and its thread count. */
|
|
51
|
+
export declare function SidebarItemCountSeparator({ className, render, ...props }: SidebarItemCountSeparatorProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
52
|
+
export type SidebarItemThreadCountProps = useRender.ComponentProps<"span"> & {
|
|
53
|
+
/**
|
|
54
|
+
* Visually hidden words read after the number, so screen readers hear what
|
|
55
|
+
* the count is (the icon is decorative). Pass localized copy.
|
|
56
|
+
*/
|
|
57
|
+
label?: string;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Thread segment of an unread count: a thread icon followed by the number of
|
|
61
|
+
* threads with new replies. Works inside SidebarItemCount or as quiet text.
|
|
62
|
+
*/
|
|
63
|
+
export declare function SidebarItemThreadCount({ children, className, label, render, ...props }: SidebarItemThreadCountProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
64
|
+
//#endregion
|