@mattermost/compass-ui 0.1.0-alpha.12 → 0.1.0-alpha.13
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/README.md +15 -3
- package/dist/compass-ui-standalone.css +270 -276
- package/dist/compass-ui.css +293 -290
- package/dist/components/action-button/ActionButton.cjs.map +1 -1
- package/dist/components/action-button/ActionButton.d.ts +2 -1
- package/dist/components/action-button/ActionButton.d.ts.map +1 -1
- package/dist/components/action-button/ActionButton.js.map +1 -1
- package/dist/components/admin-console-header/AdminConsoleHeader.cjs.map +1 -1
- package/dist/components/admin-console-header/AdminConsoleHeader.d.ts +3 -1
- package/dist/components/admin-console-header/AdminConsoleHeader.d.ts.map +1 -1
- package/dist/components/admin-console-header/AdminConsoleHeader.js.map +1 -1
- package/dist/components/admin-panel/AdminPanel.cjs +1 -1
- package/dist/components/admin-panel/AdminPanel.cjs.map +1 -1
- package/dist/components/admin-panel/AdminPanel.d.ts +13 -6
- package/dist/components/admin-panel/AdminPanel.d.ts.map +1 -1
- package/dist/components/admin-panel/AdminPanel.js +21 -15
- package/dist/components/admin-panel/AdminPanel.js.map +1 -1
- package/dist/components/admin-panel-footer/AdminPanelFooter.cjs.map +1 -1
- package/dist/components/admin-panel-footer/AdminPanelFooter.d.ts +8 -4
- package/dist/components/admin-panel-footer/AdminPanelFooter.d.ts.map +1 -1
- package/dist/components/admin-panel-footer/AdminPanelFooter.js.map +1 -1
- package/dist/components/admin-panel-header/AdminPanelHeader.cjs +1 -1
- package/dist/components/admin-panel-header/AdminPanelHeader.cjs.map +1 -1
- package/dist/components/admin-panel-header/AdminPanelHeader.css +1 -1
- package/dist/components/admin-panel-header/AdminPanelHeader.d.ts +11 -4
- package/dist/components/admin-panel-header/AdminPanelHeader.d.ts.map +1 -1
- package/dist/components/admin-panel-header/AdminPanelHeader.js +25 -23
- package/dist/components/admin-panel-header/AdminPanelHeader.js.map +1 -1
- package/dist/components/admin-panel-header/AdminPanelHeader.module.scss.cjs +1 -1
- package/dist/components/admin-panel-header/AdminPanelHeader.module.scss.js +10 -10
- package/dist/components/attachment-card/AttachmentCard.cjs +1 -1
- package/dist/components/attachment-card/AttachmentCard.cjs.map +1 -1
- package/dist/components/attachment-card/AttachmentCard.d.ts +18 -5
- package/dist/components/attachment-card/AttachmentCard.d.ts.map +1 -1
- package/dist/components/attachment-card/AttachmentCard.js +85 -79
- package/dist/components/attachment-card/AttachmentCard.js.map +1 -1
- package/dist/components/card-button/CardButton.css +1 -1
- package/dist/components/card-button/CardButton.module.scss.cjs +1 -1
- package/dist/components/card-button/CardButton.module.scss.js +7 -7
- package/dist/components/channel-info-msg-header/ChannelInfoMsgHeader.cjs +1 -1
- package/dist/components/channel-info-msg-header/ChannelInfoMsgHeader.cjs.map +1 -1
- package/dist/components/channel-info-msg-header/ChannelInfoMsgHeader.d.ts +5 -4
- package/dist/components/channel-info-msg-header/ChannelInfoMsgHeader.d.ts.map +1 -1
- package/dist/components/channel-info-msg-header/ChannelInfoMsgHeader.js +7 -7
- package/dist/components/channel-info-msg-header/ChannelInfoMsgHeader.js.map +1 -1
- package/dist/components/channel-sidebar-item/ChannelSidebarItem.cjs +1 -1
- package/dist/components/channel-sidebar-item/ChannelSidebarItem.cjs.map +1 -1
- package/dist/components/channel-sidebar-item/ChannelSidebarItem.d.ts +10 -4
- package/dist/components/channel-sidebar-item/ChannelSidebarItem.d.ts.map +1 -1
- package/dist/components/channel-sidebar-item/ChannelSidebarItem.js +64 -60
- package/dist/components/channel-sidebar-item/ChannelSidebarItem.js.map +1 -1
- package/dist/components/chip/Chip.cjs.map +1 -1
- package/dist/components/chip/Chip.css +1 -1
- package/dist/components/chip/Chip.d.ts +4 -0
- package/dist/components/chip/Chip.d.ts.map +1 -1
- package/dist/components/chip/Chip.js.map +1 -1
- package/dist/components/chip/Chip.module.scss.cjs +1 -1
- package/dist/components/chip/Chip.module.scss.js +11 -11
- package/dist/components/combobox/Combobox.cjs +1 -1
- package/dist/components/combobox/Combobox.cjs.map +1 -1
- package/dist/components/combobox/Combobox.css +1 -1
- package/dist/components/combobox/Combobox.d.ts +24 -1
- package/dist/components/combobox/Combobox.d.ts.map +1 -1
- package/dist/components/combobox/Combobox.js +307 -271
- package/dist/components/combobox/Combobox.js.map +1 -1
- package/dist/components/combobox/Combobox.module.scss.cjs +1 -1
- package/dist/components/combobox/Combobox.module.scss.js +28 -26
- package/dist/components/combobox/Combobox.module.scss.js.map +1 -1
- package/dist/components/date-range-picker/DateRangePicker.cjs +1 -1
- package/dist/components/date-range-picker/DateRangePicker.cjs.map +1 -1
- package/dist/components/date-range-picker/DateRangePicker.css +1 -1
- package/dist/components/date-range-picker/DateRangePicker.d.ts +18 -2
- package/dist/components/date-range-picker/DateRangePicker.d.ts.map +1 -1
- package/dist/components/date-range-picker/DateRangePicker.js +134 -126
- package/dist/components/date-range-picker/DateRangePicker.js.map +1 -1
- package/dist/components/date-range-picker/DateRangePicker.module.scss.cjs +1 -1
- package/dist/components/date-range-picker/DateRangePicker.module.scss.js +26 -26
- package/dist/components/emoji-popover/EmojiPopover.cjs +1 -1
- package/dist/components/emoji-popover/EmojiPopover.cjs.map +1 -1
- package/dist/components/emoji-popover/EmojiPopover.d.ts +25 -4
- package/dist/components/emoji-popover/EmojiPopover.d.ts.map +1 -1
- package/dist/components/emoji-popover/EmojiPopover.js +84 -73
- package/dist/components/emoji-popover/EmojiPopover.js.map +1 -1
- package/dist/components/empty-state/EmptyState.cjs +1 -1
- package/dist/components/empty-state/EmptyState.cjs.map +1 -1
- package/dist/components/empty-state/EmptyState.d.ts +3 -3
- package/dist/components/empty-state/EmptyState.d.ts.map +1 -1
- package/dist/components/empty-state/EmptyState.js +11 -9
- package/dist/components/empty-state/EmptyState.js.map +1 -1
- package/dist/components/error-message/ErrorMessage.cjs +1 -1
- package/dist/components/error-message/ErrorMessage.cjs.map +1 -1
- package/dist/components/error-message/ErrorMessage.d.ts +3 -3
- package/dist/components/error-message/ErrorMessage.d.ts.map +1 -1
- package/dist/components/error-message/ErrorMessage.js +10 -9
- package/dist/components/error-message/ErrorMessage.js.map +1 -1
- package/dist/components/feature-discovery-panel/FeatureDiscoveryPanel.cjs.map +1 -1
- package/dist/components/feature-discovery-panel/FeatureDiscoveryPanel.d.ts +7 -6
- package/dist/components/feature-discovery-panel/FeatureDiscoveryPanel.d.ts.map +1 -1
- package/dist/components/feature-discovery-panel/FeatureDiscoveryPanel.js.map +1 -1
- package/dist/components/global-banner/GlobalBanner.cjs +1 -1
- package/dist/components/global-banner/GlobalBanner.cjs.map +1 -1
- package/dist/components/global-banner/GlobalBanner.d.ts +10 -5
- package/dist/components/global-banner/GlobalBanner.d.ts.map +1 -1
- package/dist/components/global-banner/GlobalBanner.js +33 -26
- package/dist/components/global-banner/GlobalBanner.js.map +1 -1
- package/dist/components/icon-button/IconButton.css +1 -1
- package/dist/components/icon-button/IconButton.module.scss.cjs +1 -1
- package/dist/components/icon-button/IconButton.module.scss.js +15 -15
- package/dist/components/image-preview/ImagePreview.cjs +1 -1
- package/dist/components/image-preview/ImagePreview.cjs.map +1 -1
- package/dist/components/image-preview/ImagePreview.css +1 -1
- package/dist/components/image-preview/ImagePreview.d.ts +12 -1
- package/dist/components/image-preview/ImagePreview.d.ts.map +1 -1
- package/dist/components/image-preview/ImagePreview.js +25 -20
- package/dist/components/image-preview/ImagePreview.js.map +1 -1
- package/dist/components/image-preview/ImagePreview.module.scss.cjs +1 -1
- package/dist/components/image-preview/ImagePreview.module.scss.js +15 -15
- package/dist/components/link-preview/LinkPreview.cjs +1 -1
- package/dist/components/link-preview/LinkPreview.cjs.map +1 -1
- package/dist/components/link-preview/LinkPreview.d.ts +12 -6
- package/dist/components/link-preview/LinkPreview.d.ts.map +1 -1
- package/dist/components/link-preview/LinkPreview.js +19 -16
- package/dist/components/link-preview/LinkPreview.js.map +1 -1
- package/dist/components/mention-badge/MentionBadge.cjs +1 -1
- package/dist/components/mention-badge/MentionBadge.cjs.map +1 -1
- package/dist/components/mention-badge/MentionBadge.d.ts +3 -1
- package/dist/components/mention-badge/MentionBadge.d.ts.map +1 -1
- package/dist/components/mention-badge/MentionBadge.js +18 -23
- package/dist/components/mention-badge/MentionBadge.js.map +1 -1
- package/dist/components/menu-group-heading/MenuGroupHeading.cjs.map +1 -1
- package/dist/components/menu-group-heading/MenuGroupHeading.d.ts +3 -3
- package/dist/components/menu-group-heading/MenuGroupHeading.d.ts.map +1 -1
- package/dist/components/menu-group-heading/MenuGroupHeading.js.map +1 -1
- package/dist/components/menu-item/MenuItem.cjs +1 -1
- package/dist/components/menu-item/MenuItem.cjs.map +1 -1
- package/dist/components/menu-item/MenuItem.d.ts +2 -0
- package/dist/components/menu-item/MenuItem.d.ts.map +1 -1
- package/dist/components/menu-item/MenuItem.js +29 -28
- package/dist/components/menu-item/MenuItem.js.map +1 -1
- package/dist/components/message-actions/MessageActions.cjs +1 -1
- package/dist/components/message-actions/MessageActions.cjs.map +1 -1
- package/dist/components/message-actions/MessageActions.d.ts +26 -2
- package/dist/components/message-actions/MessageActions.d.ts.map +1 -1
- package/dist/components/message-actions/MessageActions.js +67 -55
- package/dist/components/message-actions/MessageActions.js.map +1 -1
- package/dist/components/message-header/MessageHeader.cjs.map +1 -1
- package/dist/components/message-header/MessageHeader.d.ts +5 -3
- package/dist/components/message-header/MessageHeader.d.ts.map +1 -1
- package/dist/components/message-header/MessageHeader.js.map +1 -1
- package/dist/components/message-separator/MessageSeparator.cjs +1 -1
- package/dist/components/message-separator/MessageSeparator.cjs.map +1 -1
- package/dist/components/message-separator/MessageSeparator.d.ts +8 -4
- package/dist/components/message-separator/MessageSeparator.d.ts.map +1 -1
- package/dist/components/message-separator/MessageSeparator.js +16 -14
- package/dist/components/message-separator/MessageSeparator.js.map +1 -1
- package/dist/components/modal/Modal.cjs +1 -1
- package/dist/components/modal/Modal.cjs.map +1 -1
- package/dist/components/modal/Modal.d.ts +17 -3
- package/dist/components/modal/Modal.d.ts.map +1 -1
- package/dist/components/modal/Modal.js +38 -26
- package/dist/components/modal/Modal.js.map +1 -1
- package/dist/components/modal-header/ModalHeader.cjs +1 -1
- package/dist/components/modal-header/ModalHeader.cjs.map +1 -1
- package/dist/components/modal-header/ModalHeader.css +1 -1
- package/dist/components/modal-header/ModalHeader.d.ts +16 -1
- package/dist/components/modal-header/ModalHeader.d.ts.map +1 -1
- package/dist/components/modal-header/ModalHeader.js +72 -57
- package/dist/components/modal-header/ModalHeader.js.map +1 -1
- package/dist/components/modal-header/ModalHeader.module.scss.cjs +1 -1
- package/dist/components/modal-header/ModalHeader.module.scss.js +15 -13
- package/dist/components/modal-header/ModalHeader.module.scss.js.map +1 -1
- package/dist/components/more-unreads-banner/MoreUnreadsBanner.cjs +1 -1
- package/dist/components/more-unreads-banner/MoreUnreadsBanner.cjs.map +1 -1
- package/dist/components/more-unreads-banner/MoreUnreadsBanner.d.ts +4 -1
- package/dist/components/more-unreads-banner/MoreUnreadsBanner.d.ts.map +1 -1
- package/dist/components/more-unreads-banner/MoreUnreadsBanner.js +11 -10
- package/dist/components/more-unreads-banner/MoreUnreadsBanner.js.map +1 -1
- package/dist/components/new-message-banner/NewMessageBanner.cjs +1 -1
- package/dist/components/new-message-banner/NewMessageBanner.cjs.map +1 -1
- package/dist/components/new-message-banner/NewMessageBanner.d.ts +15 -3
- package/dist/components/new-message-banner/NewMessageBanner.d.ts.map +1 -1
- package/dist/components/new-message-banner/NewMessageBanner.js +30 -22
- package/dist/components/new-message-banner/NewMessageBanner.js.map +1 -1
- package/dist/components/pagination-dots/PaginationDots.cjs +1 -1
- package/dist/components/pagination-dots/PaginationDots.cjs.map +1 -1
- package/dist/components/pagination-dots/PaginationDots.css +1 -1
- package/dist/components/pagination-dots/PaginationDots.d.ts +5 -1
- package/dist/components/pagination-dots/PaginationDots.d.ts.map +1 -1
- package/dist/components/pagination-dots/PaginationDots.js +22 -19
- package/dist/components/pagination-dots/PaginationDots.js.map +1 -1
- package/dist/components/pagination-dots/PaginationDots.module.scss.cjs +1 -1
- package/dist/components/pagination-dots/PaginationDots.module.scss.js +10 -10
- package/dist/components/permalink-preview/PermalinkPreview.cjs +1 -1
- package/dist/components/permalink-preview/PermalinkPreview.cjs.map +1 -1
- package/dist/components/permalink-preview/PermalinkPreview.d.ts +16 -5
- package/dist/components/permalink-preview/PermalinkPreview.d.ts.map +1 -1
- package/dist/components/permalink-preview/PermalinkPreview.js +39 -35
- package/dist/components/permalink-preview/PermalinkPreview.js.map +1 -1
- package/dist/components/pinned-saved-indicators/PinnedSavedIndicators.cjs +1 -1
- package/dist/components/pinned-saved-indicators/PinnedSavedIndicators.cjs.map +1 -1
- package/dist/components/pinned-saved-indicators/PinnedSavedIndicators.d.ts +8 -1
- package/dist/components/pinned-saved-indicators/PinnedSavedIndicators.d.ts.map +1 -1
- package/dist/components/pinned-saved-indicators/PinnedSavedIndicators.js +20 -17
- package/dist/components/pinned-saved-indicators/PinnedSavedIndicators.js.map +1 -1
- package/dist/components/popover-notice/PopoverNotice.cjs +1 -1
- package/dist/components/popover-notice/PopoverNotice.cjs.map +1 -1
- package/dist/components/popover-notice/PopoverNotice.d.ts +13 -5
- package/dist/components/popover-notice/PopoverNotice.d.ts.map +1 -1
- package/dist/components/popover-notice/PopoverNotice.js +58 -48
- package/dist/components/popover-notice/PopoverNotice.js.map +1 -1
- package/dist/components/profile-popover/ProfilePopover.cjs +1 -1
- package/dist/components/profile-popover/ProfilePopover.cjs.map +1 -1
- package/dist/components/profile-popover/ProfilePopover.d.ts +34 -12
- package/dist/components/profile-popover/ProfilePopover.d.ts.map +1 -1
- package/dist/components/profile-popover/ProfilePopover.js +122 -106
- package/dist/components/profile-popover/ProfilePopover.js.map +1 -1
- package/dist/components/progress-bar/ProgressBar.cjs +1 -1
- package/dist/components/progress-bar/ProgressBar.cjs.map +1 -1
- package/dist/components/progress-bar/ProgressBar.d.ts +4 -3
- package/dist/components/progress-bar/ProgressBar.d.ts.map +1 -1
- package/dist/components/progress-bar/ProgressBar.js +9 -7
- package/dist/components/progress-bar/ProgressBar.js.map +1 -1
- package/dist/components/radio/Radio.css +1 -1
- package/dist/components/radio/Radio.module.scss.cjs +1 -1
- package/dist/components/radio/Radio.module.scss.js +12 -12
- package/dist/components/reaction-button/ReactionButton.cjs +1 -1
- package/dist/components/reaction-button/ReactionButton.cjs.map +1 -1
- package/dist/components/reaction-button/ReactionButton.d.ts +3 -1
- package/dist/components/reaction-button/ReactionButton.d.ts.map +1 -1
- package/dist/components/reaction-button/ReactionButton.js +20 -18
- package/dist/components/reaction-button/ReactionButton.js.map +1 -1
- package/dist/components/reactions-row/ReactionsRow.cjs +1 -1
- package/dist/components/reactions-row/ReactionsRow.cjs.map +1 -1
- package/dist/components/reactions-row/ReactionsRow.d.ts +10 -2
- package/dist/components/reactions-row/ReactionsRow.d.ts.map +1 -1
- package/dist/components/reactions-row/ReactionsRow.js +33 -28
- package/dist/components/reactions-row/ReactionsRow.js.map +1 -1
- package/dist/components/right-sidebar-header/RightSidebarHeader.cjs +1 -1
- package/dist/components/right-sidebar-header/RightSidebarHeader.cjs.map +1 -1
- package/dist/components/right-sidebar-header/RightSidebarHeader.d.ts +15 -7
- package/dist/components/right-sidebar-header/RightSidebarHeader.d.ts.map +1 -1
- package/dist/components/right-sidebar-header/RightSidebarHeader.js +23 -19
- package/dist/components/right-sidebar-header/RightSidebarHeader.js.map +1 -1
- package/dist/components/scrollbar/Scrollbar.cjs +1 -1
- package/dist/components/scrollbar/Scrollbar.cjs.map +1 -1
- package/dist/components/scrollbar/Scrollbar.css +1 -1
- package/dist/components/scrollbar/Scrollbar.d.ts +2 -2
- package/dist/components/scrollbar/Scrollbar.d.ts.map +1 -1
- package/dist/components/scrollbar/Scrollbar.js +24 -15
- package/dist/components/scrollbar/Scrollbar.js.map +1 -1
- package/dist/components/scrollbar/Scrollbar.module.scss.cjs +1 -1
- package/dist/components/scrollbar/Scrollbar.module.scss.js +4 -4
- package/dist/components/scrollbar/simplebar-vendor.css +1 -0
- package/dist/components/search-input/SearchInput.cjs +1 -1
- package/dist/components/search-input/SearchInput.cjs.map +1 -1
- package/dist/components/search-input/SearchInput.d.ts +5 -0
- package/dist/components/search-input/SearchInput.d.ts.map +1 -1
- package/dist/components/search-input/SearchInput.js +92 -85
- package/dist/components/search-input/SearchInput.js.map +1 -1
- package/dist/components/search-tip-banner/SearchTipBanner.cjs +1 -1
- package/dist/components/search-tip-banner/SearchTipBanner.cjs.map +1 -1
- package/dist/components/search-tip-banner/SearchTipBanner.d.ts +8 -5
- package/dist/components/search-tip-banner/SearchTipBanner.d.ts.map +1 -1
- package/dist/components/search-tip-banner/SearchTipBanner.js +17 -16
- package/dist/components/search-tip-banner/SearchTipBanner.js.map +1 -1
- package/dist/components/section-notice/SectionNotice.cjs +1 -1
- package/dist/components/section-notice/SectionNotice.cjs.map +1 -1
- package/dist/components/section-notice/SectionNotice.d.ts +16 -3
- package/dist/components/section-notice/SectionNotice.d.ts.map +1 -1
- package/dist/components/section-notice/SectionNotice.js +64 -48
- package/dist/components/section-notice/SectionNotice.js.map +1 -1
- package/dist/components/select/Select.cjs +1 -1
- package/dist/components/select/Select.cjs.map +1 -1
- package/dist/components/select/Select.d.ts +8 -1
- package/dist/components/select/Select.d.ts.map +1 -1
- package/dist/components/select/Select.js +81 -79
- package/dist/components/select/Select.js.map +1 -1
- package/dist/components/spinner/Spinner.cjs.map +1 -1
- package/dist/components/spinner/Spinner.css +1 -1
- package/dist/components/spinner/Spinner.d.ts +1 -0
- package/dist/components/spinner/Spinner.d.ts.map +1 -1
- package/dist/components/spinner/Spinner.js.map +1 -1
- package/dist/components/spinner/Spinner.module.scss.cjs +1 -1
- package/dist/components/spinner/Spinner.module.scss.js +5 -5
- package/dist/components/status-badge/StatusBadge.css +1 -1
- package/dist/components/status-badge/StatusBadge.module.scss.cjs +1 -1
- package/dist/components/status-badge/StatusBadge.module.scss.js +11 -11
- package/dist/components/switch/Switch.css +1 -1
- package/dist/components/switch/Switch.module.scss.cjs +1 -1
- package/dist/components/switch/Switch.module.scss.js +14 -14
- package/dist/components/tabs/Tabs.cjs +1 -1
- package/dist/components/tabs/Tabs.cjs.map +1 -1
- package/dist/components/tabs/Tabs.css +1 -1
- package/dist/components/tabs/Tabs.d.ts +11 -3
- package/dist/components/tabs/Tabs.d.ts.map +1 -1
- package/dist/components/tabs/Tabs.js +56 -53
- package/dist/components/tabs/Tabs.js.map +1 -1
- package/dist/components/tabs/Tabs.module.scss.cjs +1 -1
- package/dist/components/tabs/Tabs.module.scss.js +9 -9
- package/dist/components/tag/Tag.cjs +1 -1
- package/dist/components/tag/Tag.cjs.map +1 -1
- package/dist/components/tag/Tag.d.ts +3 -3
- package/dist/components/tag/Tag.d.ts.map +1 -1
- package/dist/components/tag/Tag.js +12 -11
- package/dist/components/tag/Tag.js.map +1 -1
- package/dist/components/thread-footer/ThreadFooter.cjs +1 -1
- package/dist/components/thread-footer/ThreadFooter.cjs.map +1 -1
- package/dist/components/thread-footer/ThreadFooter.css +1 -1
- package/dist/components/thread-footer/ThreadFooter.d.ts +19 -3
- package/dist/components/thread-footer/ThreadFooter.d.ts.map +1 -1
- package/dist/components/thread-footer/ThreadFooter.js +53 -48
- package/dist/components/thread-footer/ThreadFooter.js.map +1 -1
- package/dist/components/thread-footer/ThreadFooter.module.scss.cjs +1 -1
- package/dist/components/thread-footer/ThreadFooter.module.scss.js +18 -18
- package/dist/components/thread-list-item/ThreadListItem.cjs +1 -1
- package/dist/components/thread-list-item/ThreadListItem.cjs.map +1 -1
- package/dist/components/thread-list-item/ThreadListItem.d.ts +15 -7
- package/dist/components/thread-list-item/ThreadListItem.d.ts.map +1 -1
- package/dist/components/thread-list-item/ThreadListItem.js +66 -62
- package/dist/components/thread-list-item/ThreadListItem.js.map +1 -1
- package/dist/components/toast/Toast.cjs +1 -1
- package/dist/components/toast/Toast.cjs.map +1 -1
- package/dist/components/toast/Toast.d.ts +8 -3
- package/dist/components/toast/Toast.d.ts.map +1 -1
- package/dist/components/toast/Toast.js +47 -39
- package/dist/components/toast/Toast.js.map +1 -1
- package/dist/components/tour-point/TourPoint.cjs +1 -1
- package/dist/components/tour-point/TourPoint.cjs.map +1 -1
- package/dist/components/tour-point/TourPoint.css +1 -1
- package/dist/components/tour-point/TourPoint.d.ts +19 -5
- package/dist/components/tour-point/TourPoint.d.ts.map +1 -1
- package/dist/components/tour-point/TourPoint.js +66 -54
- package/dist/components/tour-point/TourPoint.js.map +1 -1
- package/dist/components/tour-point/TourPoint.module.scss.cjs +1 -1
- package/dist/components/tour-point/TourPoint.module.scss.js +28 -28
- package/dist/components/unread-badge/UnreadBadge.css +1 -1
- package/dist/components/unread-badge/UnreadBadge.module.scss.cjs +1 -1
- package/dist/components/unread-badge/UnreadBadge.module.scss.js +5 -5
- package/dist/components/user-avatar/UserAvatar.css +1 -1
- package/dist/components/user-avatar/UserAvatar.module.scss.cjs +1 -1
- package/dist/components/user-avatar/UserAvatar.module.scss.js +26 -26
- package/dist/components/user-avatar-group/UserAvatarGroup.cjs +1 -1
- package/dist/components/user-avatar-group/UserAvatarGroup.cjs.map +1 -1
- package/dist/components/user-avatar-group/UserAvatarGroup.css +1 -1
- package/dist/components/user-avatar-group/UserAvatarGroup.d.ts +8 -1
- package/dist/components/user-avatar-group/UserAvatarGroup.d.ts.map +1 -1
- package/dist/components/user-avatar-group/UserAvatarGroup.js +22 -18
- package/dist/components/user-avatar-group/UserAvatarGroup.js.map +1 -1
- package/dist/components/user-avatar-group/UserAvatarGroup.module.scss.cjs +1 -1
- package/dist/components/user-avatar-group/UserAvatarGroup.module.scss.js +14 -14
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/utils/props.cjs +2 -0
- package/dist/utils/props.cjs.map +1 -0
- package/dist/utils/props.d.ts +13 -0
- package/dist/utils/props.d.ts.map +1 -0
- package/dist/utils/props.js +7 -0
- package/dist/utils/props.js.map +1 -0
- package/package.json +1 -6
- package/dist/node_modules/simplebar-react/dist/simplebar.min.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { UserAvatarGroupItem } from '../user-avatar-group/UserAvatarGroup';
|
|
3
3
|
export type ThreadFooterBadge = 'none' | 'unread' | 'mention';
|
|
4
4
|
export interface ThreadFooterProps extends HTMLAttributes<HTMLDivElement> {
|
|
@@ -13,7 +13,7 @@ export interface ThreadFooterProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
13
13
|
/** Whether the current user is following the thread. Default: false. */
|
|
14
14
|
following?: boolean;
|
|
15
15
|
/** Last reply timestamp label. Shown on row hover when following. */
|
|
16
|
-
lastReplyTime?:
|
|
16
|
+
lastReplyTime?: ReactNode;
|
|
17
17
|
/** Called when Reply is clicked. */
|
|
18
18
|
onReply?: () => void;
|
|
19
19
|
/** Called when Follow/Following is clicked. */
|
|
@@ -22,11 +22,27 @@ export interface ThreadFooterProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
22
22
|
hovered?: boolean;
|
|
23
23
|
/** Optional CSS class name. */
|
|
24
24
|
className?: string;
|
|
25
|
+
/** Visible reply count. Default: `{count} reply` / `{count} replies`. */
|
|
26
|
+
formatReplyCount?: (count: number) => ReactNode;
|
|
27
|
+
/** Accessible name for the reply button. Default: `{count} reply` / `{count} replies`. */
|
|
28
|
+
formatReplyLabel?: (count: number) => string;
|
|
29
|
+
/** Visually hidden mention hint. Default: `{count} mention(s)`. */
|
|
30
|
+
formatMentionLabel?: (count: number) => ReactNode;
|
|
31
|
+
/** Visually hidden unread hint. Default: "Unread replies". */
|
|
32
|
+
unreadLabel?: ReactNode;
|
|
33
|
+
/** Visible follow button text when not following. Default: "Follow". */
|
|
34
|
+
followLabel?: ReactNode;
|
|
35
|
+
/** Visible follow button text when following. Default: "Following". */
|
|
36
|
+
followingLabel?: ReactNode;
|
|
37
|
+
/** Accessible name for the follow button when not following. Default: "Follow thread". */
|
|
38
|
+
followAriaLabel?: string;
|
|
39
|
+
/** Accessible name for the follow button when following. Default: "Unfollow thread". */
|
|
40
|
+
unfollowAriaLabel?: string;
|
|
25
41
|
}
|
|
26
42
|
/**
|
|
27
43
|
* The Thread Footer is the reply summary bar at the bottom of a message. It shows
|
|
28
44
|
* participants, reply count, follow state, and last-reply time — the information someone
|
|
29
45
|
* needs to decide whether to dive in.
|
|
30
46
|
*/
|
|
31
|
-
export default function ThreadFooter({ replyCount, avatars, badge, mentionCount, following, lastReplyTime, onReply, onFollowToggle, hovered, className, ...rest }: ThreadFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
export default function ThreadFooter({ replyCount, avatars, badge, mentionCount, following, lastReplyTime, onReply, onFollowToggle, hovered, className, formatReplyCount, formatReplyLabel, formatMentionLabel, unreadLabel, followLabel, followingLabel, followAriaLabel, unfollowAriaLabel, ...rest }: ThreadFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
32
48
|
//# sourceMappingURL=ThreadFooter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadFooter.d.ts","sourceRoot":"","sources":["../../../src/components/thread-footer/ThreadFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ThreadFooter.d.ts","sourceRoot":"","sources":["../../../src/components/thread-footer/ThreadFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvD,OAAwB,EACtB,KAAK,mBAAmB,EACzB,MAAM,8CAA8C,CAAC;AAGtD,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE9D,MAAM,WAAW,iBAAkB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACvE,+BAA+B;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4FAA4F;IAC5F,OAAO,CAAC,EAAE,mBAAmB,EAAE,CAAC;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,GAAG,IAAI,EACR,EAAE,iBAAiB,2CAwGnB"}
|
|
@@ -1,43 +1,52 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { jsx as r, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import m from "../button/Button.js";
|
|
3
|
+
import $ from "../icon/Icon.js";
|
|
4
|
+
import __w from "@mattermost/compass-icons/components/reply-outline.js";const w=__w&&__w.default?__w.default:__w;
|
|
5
|
+
import I from "../mention-badge/MentionBadge.js";
|
|
6
|
+
import U from "../user-avatar-group/UserAvatarGroup.js";
|
|
7
7
|
import e from "./ThreadFooter.module.scss.js";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
const c = (a) => `${a} ${a === 1 ? "reply" : "replies"}`, g = (a) => `${a} mention${a === 1 ? "" : "s"}`;
|
|
9
|
+
function O({
|
|
10
|
+
replyCount: a = 3,
|
|
11
|
+
avatars: s = [],
|
|
12
|
+
badge: o = "none",
|
|
13
|
+
mentionCount: l = 1,
|
|
14
|
+
following: t = !1,
|
|
15
|
+
lastReplyTime: i,
|
|
16
|
+
onReply: f,
|
|
17
|
+
onFollowToggle: _,
|
|
17
18
|
hovered: d = !1,
|
|
18
|
-
className:
|
|
19
|
-
|
|
19
|
+
className: p = "",
|
|
20
|
+
formatReplyCount: u = c,
|
|
21
|
+
formatReplyLabel: N = c,
|
|
22
|
+
formatMentionLabel: v = g,
|
|
23
|
+
unreadLabel: y = "Unread replies",
|
|
24
|
+
followLabel: b = "Follow",
|
|
25
|
+
followingLabel: x = "Following",
|
|
26
|
+
followAriaLabel: F = "Follow thread",
|
|
27
|
+
unfollowAriaLabel: j = "Unfollow thread",
|
|
28
|
+
...z
|
|
20
29
|
}) {
|
|
21
|
-
const
|
|
30
|
+
const B = [
|
|
22
31
|
e["thread-footer"],
|
|
23
|
-
|
|
32
|
+
t ? e["thread-footer--following"] : "",
|
|
24
33
|
d ? e["thread-footer--hovered"] : "",
|
|
25
|
-
|
|
26
|
-
].filter(Boolean).join(" "), h =
|
|
27
|
-
return /* @__PURE__ */ r("div", { className:
|
|
28
|
-
/* @__PURE__ */
|
|
34
|
+
p
|
|
35
|
+
].filter(Boolean).join(" "), h = o === "mention" ? v(l) : o === "unread" ? y : void 0;
|
|
36
|
+
return /* @__PURE__ */ r("div", { className: B, ...z, children: /* @__PURE__ */ n("div", { className: e["thread-footer__inner"], children: [
|
|
37
|
+
/* @__PURE__ */ n("div", { className: e["thread-footer__avatars-group"], children: [
|
|
29
38
|
h && /* @__PURE__ */ r("span", { className: e["thread-footer__status-hint"], children: h }),
|
|
30
|
-
(
|
|
39
|
+
(o === "unread" || o === "mention") && /* @__PURE__ */ n(
|
|
31
40
|
"div",
|
|
32
41
|
{
|
|
33
42
|
className: e["thread-footer__badge-container"],
|
|
34
43
|
"aria-hidden": !0,
|
|
35
44
|
children: [
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
45
|
+
o === "unread" && /* @__PURE__ */ r("span", { className: e["thread-footer__unread-dot"] }),
|
|
46
|
+
o === "mention" && /* @__PURE__ */ r("span", { className: e["thread-footer__mention-badge"], children: /* @__PURE__ */ r(
|
|
47
|
+
I,
|
|
39
48
|
{
|
|
40
|
-
count:
|
|
49
|
+
count: l,
|
|
41
50
|
location: "channel",
|
|
42
51
|
size: "medium"
|
|
43
52
|
}
|
|
@@ -45,11 +54,11 @@ function I({
|
|
|
45
54
|
]
|
|
46
55
|
}
|
|
47
56
|
),
|
|
48
|
-
|
|
57
|
+
s.length > 0 && /* @__PURE__ */ r(U, { avatars: s, max: 3, size: "20" })
|
|
49
58
|
] }),
|
|
50
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ n("div", { className: e["thread-footer__buttons"], children: [
|
|
51
60
|
/* @__PURE__ */ r(
|
|
52
|
-
|
|
61
|
+
m,
|
|
53
62
|
{
|
|
54
63
|
emphasis: "quaternary",
|
|
55
64
|
size: "x-small",
|
|
@@ -57,40 +66,36 @@ function I({
|
|
|
57
66
|
e["thread-footer__reply-btn"],
|
|
58
67
|
d ? e["thread-footer__reply-btn--hovered"] : ""
|
|
59
68
|
].filter(Boolean).join(" "),
|
|
60
|
-
onClick:
|
|
61
|
-
"aria-label":
|
|
62
|
-
leadingIcon: /* @__PURE__ */ r(
|
|
63
|
-
children: /* @__PURE__ */
|
|
64
|
-
s,
|
|
65
|
-
" ",
|
|
66
|
-
s === 1 ? "reply" : "replies"
|
|
67
|
-
] })
|
|
69
|
+
onClick: f,
|
|
70
|
+
"aria-label": N(a),
|
|
71
|
+
leadingIcon: /* @__PURE__ */ r($, { size: "12", glyph: /* @__PURE__ */ r(w, {}) }),
|
|
72
|
+
children: /* @__PURE__ */ r("span", { className: e["thread-footer__btn-label"], children: u(a) })
|
|
68
73
|
}
|
|
69
74
|
),
|
|
70
75
|
/* @__PURE__ */ r("div", { className: e["thread-footer__divider"], "aria-hidden": !0 }),
|
|
71
76
|
/* @__PURE__ */ r(
|
|
72
|
-
|
|
77
|
+
m,
|
|
73
78
|
{
|
|
74
79
|
emphasis: "quaternary",
|
|
75
80
|
size: "x-small",
|
|
76
81
|
className: [
|
|
77
82
|
e["thread-footer__follow-btn"],
|
|
78
|
-
|
|
83
|
+
t ? e["thread-footer__follow-btn--following"] : ""
|
|
79
84
|
].filter(Boolean).join(" "),
|
|
80
|
-
onClick:
|
|
81
|
-
"aria-pressed":
|
|
82
|
-
"aria-label":
|
|
83
|
-
children:
|
|
85
|
+
onClick: _,
|
|
86
|
+
"aria-pressed": t,
|
|
87
|
+
"aria-label": t ? j : F,
|
|
88
|
+
children: t ? x : b
|
|
84
89
|
}
|
|
85
90
|
),
|
|
86
|
-
|
|
91
|
+
t && i && /* @__PURE__ */ n("div", { className: e["thread-footer__last-reply-group"], children: [
|
|
87
92
|
/* @__PURE__ */ r("div", { className: e["thread-footer__divider"], "aria-hidden": !0 }),
|
|
88
|
-
/* @__PURE__ */ r("span", { className: e["thread-footer__last-reply"], children:
|
|
93
|
+
/* @__PURE__ */ r("span", { className: e["thread-footer__last-reply"], children: i })
|
|
89
94
|
] })
|
|
90
95
|
] })
|
|
91
96
|
] }) });
|
|
92
97
|
}
|
|
93
98
|
export {
|
|
94
|
-
|
|
99
|
+
O as default
|
|
95
100
|
};
|
|
96
101
|
//# sourceMappingURL=ThreadFooter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadFooter.js","sources":["../../../src/components/thread-footer/ThreadFooter.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\nimport Button from '@/components/button/Button';\nimport Icon from '@/components/icon/Icon';\nimport ReplyOutlineIcon from '@mattermost/compass-icons/components/reply-outline';\nimport MentionBadge from '@/components/mention-badge/MentionBadge';\nimport UserAvatarGroup, {\n type UserAvatarGroupItem,\n} from '@/components/user-avatar-group/UserAvatarGroup';\nimport styles from './ThreadFooter.module.scss';\n\nexport type ThreadFooterBadge = 'none' | 'unread' | 'mention';\n\nexport interface ThreadFooterProps extends HTMLAttributes<HTMLDivElement> {\n /** Reply count. Default: 3. */\n replyCount?: number;\n /** Participant avatars. Rendered with User Avatar Group (first 3 shown, overflow as +N). */\n avatars?: UserAvatarGroupItem[];\n /** Badge variant. Default: None. */\n badge?: ThreadFooterBadge;\n /** Shown when `badge` is Mention. Default: 1. */\n mentionCount?: number;\n /** Whether the current user is following the thread. Default: false. */\n following?: boolean;\n /** Last reply timestamp label. Shown on row hover when following. */\n lastReplyTime?: string;\n /** Called when Reply is clicked. */\n onReply?: () => void;\n /** Called when Follow/Following is clicked. */\n onFollowToggle?: () => void;\n /** Hover / active state for button highlight. Default: false. */\n hovered?: boolean;\n /** Optional CSS class name. */\n className?: string;\n}\n\n/**\n * The Thread Footer is the reply summary bar at the bottom of a message. It shows\n * participants, reply count, follow state, and last-reply time — the information someone\n * needs to decide whether to dive in.\n */\nexport default function ThreadFooter({\n replyCount = 3,\n avatars = [],\n badge = 'none',\n mentionCount = 1,\n following = false,\n lastReplyTime,\n onReply,\n onFollowToggle,\n hovered = false,\n className = '',\n ...rest\n}: ThreadFooterProps) {\n const rootClass = [\n styles['thread-footer'],\n following ? styles['thread-footer--following'] : '',\n hovered ? styles['thread-footer--hovered'] : '',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n const badgeStatusHint =\n badge === 'mention'\n ? `${mentionCount} mention${mentionCount === 1 ? '' : 's'}`\n : badge === 'unread'\n ? 'Unread replies'\n : undefined;\n\n return (\n <div className={rootClass} {...rest}>\n <div className={styles['thread-footer__inner']}>\n <div className={styles['thread-footer__avatars-group']}>\n {badgeStatusHint && (\n <span className={styles['thread-footer__status-hint']}>\n {badgeStatusHint}\n </span>\n )}\n {(badge === 'unread' || badge === 'mention') && (\n <div\n className={styles['thread-footer__badge-container']}\n aria-hidden\n >\n {badge === 'unread' && (\n <span className={styles['thread-footer__unread-dot']} />\n )}\n {badge === 'mention' && (\n <span className={styles['thread-footer__mention-badge']}>\n <MentionBadge\n count={mentionCount}\n location=\"channel\"\n size=\"medium\"\n />\n </span>\n )}\n </div>\n )}\n\n {avatars.length > 0 && (\n <UserAvatarGroup avatars={avatars} max={3} size=\"20\" />\n )}\n </div>\n\n {/* Buttons */}\n <div className={styles['thread-footer__buttons']}>\n {/* Reply button */}\n <Button\n emphasis=\"quaternary\"\n size=\"x-small\"\n className={[\n styles['thread-footer__reply-btn'],\n hovered ? styles['thread-footer__reply-btn--hovered'] : '',\n ]\n .filter(Boolean)\n .join(' ')}\n onClick={onReply}\n aria-label={`${replyCount} repl${replyCount === 1 ? 'y' : 'ies'}`}\n leadingIcon={<Icon size=\"12\" glyph={<ReplyOutlineIcon />} />}\n >\n <span className={styles['thread-footer__btn-label']}>\n {replyCount} {replyCount === 1 ? 'reply' : 'replies'}\n </span>\n </Button>\n\n <div className={styles['thread-footer__divider']} aria-hidden />\n\n {/* Follow / Following button */}\n <Button\n emphasis=\"quaternary\"\n size=\"x-small\"\n className={[\n styles['thread-footer__follow-btn'],\n following ? styles['thread-footer__follow-btn--following'] : '',\n ]\n .filter(Boolean)\n .join(' ')}\n onClick={onFollowToggle}\n aria-pressed={following}\n aria-label={following ? 'Unfollow thread' : 'Follow thread'}\n >\n {following ? 'Following' : 'Follow'}\n </Button>\n\n {/* Last reply time — revealed on row hover when following */}\n {following && lastReplyTime && (\n <div className={styles['thread-footer__last-reply-group']}>\n <div className={styles['thread-footer__divider']} aria-hidden />\n <span className={styles['thread-footer__last-reply']}>\n {lastReplyTime}\n </span>\n </div>\n )}\n </div>\n </div>\n </div>\n );\n}\n"],"names":["ThreadFooter","replyCount","avatars","badge","mentionCount","following","lastReplyTime","onReply","onFollowToggle","hovered","className","rest","rootClass","styles","badgeStatusHint","jsx","jsxs","MentionBadge","UserAvatarGroup","Button","Icon","ReplyOutlineIcon"],"mappings":";;;;;;;AAwCA,SAAwBA,EAAa;AAAA,EACnC,YAAAC,IAAa;AAAA,EACb,SAAAC,IAAU,CAAA;AAAA,EACV,OAAAC,IAAQ;AAAA,EACR,cAAAC,IAAe;AAAA,EACf,WAAAC,IAAY;AAAA,EACZ,eAAAC;AAAA,EACA,SAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,WAAAC,IAAY;AAAA,EACZ,GAAGC;AACL,GAAsB;AACpB,QAAMC,IAAY;AAAA,IAChBC,EAAO,eAAe;AAAA,IACtBR,IAAYQ,EAAO,0BAA0B,IAAI;AAAA,IACjDJ,IAAUI,EAAO,wBAAwB,IAAI;AAAA,IAC7CH;AAAA,EAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG,GAELI,IACJX,MAAU,YACN,GAAGC,CAAY,WAAWA,MAAiB,IAAI,KAAK,GAAG,KACvDD,MAAU,WACR,mBACA;AAER,SACE,gBAAAY,EAAC,OAAA,EAAI,W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AL,EAACM,KAAiB,GAAI;AAAA,UAE1D,UAAA,gBAAAL,EAAC,QAAA,EAAK,WAAWH,EAAO,0BAA0B,GAC/C,UAAA;AAAA,YAAAZ;AAAA,YAAW;AAAA,YAAEA,MAAe,IAAI,UAAU;AAAA,UAAA,EAAA,CAC7C;AAAA,QAAA;AAAA,MAAA;AAAA,wBAGD,OAAA,EAAI,WAAWY,EAAO,wBAAwB,GAAG,eAAW,IAAC;AAAA,MAG9D,gBAAAE;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,UAAS;AAAA,UACT,MAAK;AAAA,UACL,WAAW;AAAA,YACTN,EAAO,2BAA2B;AAAA,YAClCR,IAAYQ,EAAO,sCAAsC,IAAI;AAAA,UAAA,EAE5D,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,UACX,SAASL;AAAA,UACT,gBAAcH;AAAA,UACd,cAAYA,IAAY,oBAAoB;AAAA,UAE3C,cAAY,cAAc;AAAA,QAAA;AAAA,MAAA;AAAA,MAI5BA,KAAaC,KACZ,gBAAAU,EAAC,SAAI,WAAWH,EAAO,iCAAiC,GACtD,UAAA;AAAA,QAAA,gBAAAE,EAAC,SAAI,WAAWF,EAAO,wBAAwB,GAAG,eAAW,IAAC;AAAA,0BAC7D,QAAA,EAAK,WAAWA,EAAO,2BAA2B,GAChD,UAAAP,EAAA,CACH;AAAA,MAAA,EAAA,CACF;AAAA,IAAA,EAAA,CAEJ;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"ThreadFooter.js","sources":["../../../src/components/thread-footer/ThreadFooter.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\nimport Button from '@/components/button/Button';\nimport Icon from '@/components/icon/Icon';\nimport ReplyOutlineIcon from '@mattermost/compass-icons/components/reply-outline';\nimport MentionBadge from '@/components/mention-badge/MentionBadge';\nimport UserAvatarGroup, {\n type UserAvatarGroupItem,\n} from '@/components/user-avatar-group/UserAvatarGroup';\nimport styles from './ThreadFooter.module.scss';\n\nexport type ThreadFooterBadge = 'none' | 'unread' | 'mention';\n\nexport interface ThreadFooterProps extends HTMLAttributes<HTMLDivElement> {\n /** Reply count. Default: 3. */\n replyCount?: number;\n /** Participant avatars. Rendered with User Avatar Group (first 3 shown, overflow as +N). */\n avatars?: UserAvatarGroupItem[];\n /** Badge variant. Default: None. */\n badge?: ThreadFooterBadge;\n /** Shown when `badge` is Mention. Default: 1. */\n mentionCount?: number;\n /** Whether the current user is following the thread. Default: false. */\n following?: boolean;\n /** Last reply timestamp label. Shown on row hover when following. */\n lastReplyTime?: ReactNode;\n /** Called when Reply is clicked. */\n onReply?: () => void;\n /** Called when Follow/Following is clicked. */\n onFollowToggle?: () => void;\n /** Hover / active state for button highlight. Default: false. */\n hovered?: boolean;\n /** Optional CSS class name. */\n className?: string;\n /** Visible reply count. Default: `{count} reply` / `{count} replies`. */\n formatReplyCount?: (count: number) => ReactNode;\n /** Accessible name for the reply button. Default: `{count} reply` / `{count} replies`. */\n formatReplyLabel?: (count: number) => string;\n /** Visually hidden mention hint. Default: `{count} mention(s)`. */\n formatMentionLabel?: (count: number) => ReactNode;\n /** Visually hidden unread hint. Default: \"Unread replies\". */\n unreadLabel?: ReactNode;\n /** Visible follow button text when not following. Default: \"Follow\". */\n followLabel?: ReactNode;\n /** Visible follow button text when following. Default: \"Following\". */\n followingLabel?: ReactNode;\n /** Accessible name for the follow button when not following. Default: \"Follow thread\". */\n followAriaLabel?: string;\n /** Accessible name for the follow button when following. Default: \"Unfollow thread\". */\n unfollowAriaLabel?: string;\n}\n\nconst defaultFormatReplies = (count: number) =>\n `${count} ${count === 1 ? 'reply' : 'replies'}`;\nconst defaultFormatMentions = (count: number) =>\n `${count} mention${count === 1 ? '' : 's'}`;\n\n/**\n * The Thread Footer is the reply summary bar at the bottom of a message. It shows\n * participants, reply count, follow state, and last-reply time — the information someone\n * needs to decide whether to dive in.\n */\nexport default function ThreadFooter({\n replyCount = 3,\n avatars = [],\n badge = 'none',\n mentionCount = 1,\n following = false,\n lastReplyTime,\n onReply,\n onFollowToggle,\n hovered = false,\n className = '',\n formatReplyCount = defaultFormatReplies,\n formatReplyLabel = defaultFormatReplies,\n formatMentionLabel = defaultFormatMentions,\n unreadLabel = 'Unread replies',\n followLabel = 'Follow',\n followingLabel = 'Following',\n followAriaLabel = 'Follow thread',\n unfollowAriaLabel = 'Unfollow thread',\n ...rest\n}: ThreadFooterProps) {\n const rootClass = [\n styles['thread-footer'],\n following ? styles['thread-footer--following'] : '',\n hovered ? styles['thread-footer--hovered'] : '',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n const badgeStatusHint =\n badge === 'mention'\n ? formatMentionLabel(mentionCount)\n : badge === 'unread'\n ? unreadLabel\n : undefined;\n\n return (\n <div className={rootClass} {...rest}>\n <div className={styles['thread-footer__inner']}>\n <div className={styles['thread-footer__avatars-group']}>\n {badgeStatusHint && (\n <span className={styles['thread-footer__status-hint']}>\n {badgeStatusHint}\n </span>\n )}\n {(badge === 'unread' || badge === 'mention') && (\n <div\n className={styles['thread-footer__badge-container']}\n aria-hidden\n >\n {badge === 'unread' && (\n <span className={styles['thread-footer__unread-dot']} />\n )}\n {badge === 'mention' && (\n <span className={styles['thread-footer__mention-badge']}>\n <MentionBadge\n count={mentionCount}\n location=\"channel\"\n size=\"medium\"\n />\n </span>\n )}\n </div>\n )}\n\n {avatars.length > 0 && (\n <UserAvatarGroup avatars={avatars} max={3} size=\"20\" />\n )}\n </div>\n\n {/* Buttons */}\n <div className={styles['thread-footer__buttons']}>\n {/* Reply button */}\n <Button\n emphasis=\"quaternary\"\n size=\"x-small\"\n className={[\n styles['thread-footer__reply-btn'],\n hovered ? styles['thread-footer__reply-btn--hovered'] : '',\n ]\n .filter(Boolean)\n .join(' ')}\n onClick={onReply}\n aria-label={formatReplyLabel(replyCount)}\n leadingIcon={<Icon size=\"12\" glyph={<ReplyOutlineIcon />} />}\n >\n <span className={styles['thread-footer__btn-label']}>\n {formatReplyCount(replyCount)}\n </span>\n </Button>\n\n <div className={styles['thread-footer__divider']} aria-hidden />\n\n {/* Follow / Following button */}\n <Button\n emphasis=\"quaternary\"\n size=\"x-small\"\n className={[\n styles['thread-footer__follow-btn'],\n following ? styles['thread-footer__follow-btn--following'] : '',\n ]\n .filter(Boolean)\n .join(' ')}\n onClick={onFollowToggle}\n aria-pressed={following}\n aria-label={following ? unfollowAriaLabel : followAriaLabel}\n >\n {following ? followingLabel : followLabel}\n </Button>\n\n {/* Last reply time — revealed on row hover when following */}\n {following && lastReplyTime && (\n <div className={styles['thread-footer__last-reply-group']}>\n <div className={styles['thread-footer__divider']} aria-hidden />\n <span className={styles['thread-footer__last-reply']}>\n {lastReplyTime}\n </span>\n </div>\n )}\n </div>\n </div>\n </div>\n );\n}\n"],"names":["defaultFormatReplies","count","defaultFormatMentions","ThreadFooter","replyCount","avatars","badge","mentionCount","following","lastReplyTime","onReply","onFollowToggle","hovered","className","formatReplyCount","formatReplyLabel","formatMentionLabel","unreadLabel","followLabel","followingLabel","followAriaLabel","unfollowAriaLabel","rest","rootClass","styles","badgeStatusHint","jsx","jsxs","MentionBadge","UserAvatarGroup","Button","Icon","ReplyOutlineIcon"],"mappings":";;;;;;;AAmDA,MAAMA,IAAuB,CAACC,MAC5B,GAAGA,CAAK,IAAIA,MAAU,IAAI,UAAU,SAAS,IACzCC,IAAwB,CAACD,MAC7B,GAAGA,CAAK,WAAWA,MAAU,IAAI,KAAK,GAAG;AAO3C,SAAwBE,EAAa;AAAA,EACnC,YAAAC,IAAa;AAAA,EACb,SAAAC,IAAU,CAAA;AAAA,EACV,OAAAC,IAAQ;AAAA,EACR,cAAAC,IAAe;AAAA,EACf,WAAAC,IAAY;AAAA,EACZ,eAAAC;AAAA,EACA,SAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,WAAAC,IAAY;AAAA,EACZ,kBAAAC,IAAmBd;AAAA,EACnB,kBAAAe,IAAmBf;AAAA,EACnB,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H;AAAA,MAAA,EAAA,CACF;AAAA,IAAA,EAAA,CAEJ;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./ThreadFooter.css');const e={"thread-footer":"_thread-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./ThreadFooter.css');const e={"thread-footer":"_thread-footer_1sd7m_2","thread-footer__inner":"_thread-footer__inner_1sd7m_8","thread-footer__avatars-group":"_thread-footer__avatars-group_1sd7m_14","thread-footer__status-hint":"_thread-footer__status-hint_1sd7m_19","thread-footer__badge-container":"_thread-footer__badge-container_1sd7m_30","thread-footer__unread-dot":"_thread-footer__unread-dot_1sd7m_39","thread-footer__mention-badge":"_thread-footer__mention-badge_1sd7m_46","thread-footer__buttons":"_thread-footer__buttons_1sd7m_49","thread-footer__reply-btn":"_thread-footer__reply-btn_1sd7m_54","thread-footer__follow-btn":"_thread-footer__follow-btn_1sd7m_54","thread-footer__follow-btn--following":"_thread-footer__follow-btn--following_1sd7m_57","thread-footer__reply-btn--hovered":"_thread-footer__reply-btn--hovered_1sd7m_63","thread-footer__btn-label":"_thread-footer__btn-label_1sd7m_73","thread-footer__divider":"_thread-footer__divider_1sd7m_80","thread-footer__last-reply-group":"_thread-footer__last-reply-group_1sd7m_93","thread-footer--following":"_thread-footer--following_1sd7m_112","thread-footer--hovered":"_thread-footer--hovered_1sd7m_112","thread-footer__last-reply":"_thread-footer__last-reply_1sd7m_93"};exports.default=e;
|
|
2
2
|
//# sourceMappingURL=ThreadFooter.module.scss.cjs.map
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import './ThreadFooter.css';const _ = {
|
|
2
|
-
"thread-footer": "_thread-
|
|
3
|
-
"thread-footer__inner": "_thread-
|
|
4
|
-
"thread-footer__avatars-group": "_thread-footer__avatars-
|
|
5
|
-
"thread-footer__status-hint": "_thread-footer__status-
|
|
6
|
-
"thread-footer__badge-container": "_thread-footer__badge-
|
|
7
|
-
"thread-footer__unread-dot": "_thread-footer__unread-
|
|
8
|
-
"thread-footer__mention-badge": "_thread-footer__mention-
|
|
9
|
-
"thread-footer__buttons": "_thread-
|
|
10
|
-
"thread-footer__reply-btn": "_thread-footer__reply-
|
|
11
|
-
"thread-footer__follow-btn": "_thread-footer__follow-
|
|
12
|
-
"thread-footer__follow-btn--following": "_thread-footer__follow-btn--
|
|
13
|
-
"thread-footer__reply-btn--hovered": "_thread-footer__reply-btn--
|
|
14
|
-
"thread-footer__btn-label": "_thread-footer__btn-
|
|
15
|
-
"thread-footer__divider": "_thread-
|
|
16
|
-
"thread-footer__last-reply-group": "_thread-footer__last-reply-
|
|
17
|
-
"thread-footer--following": "_thread-footer--
|
|
18
|
-
"thread-footer--hovered": "_thread-footer--
|
|
19
|
-
"thread-footer__last-reply": "_thread-footer__last-
|
|
2
|
+
"thread-footer": "_thread-footer_1sd7m_2",
|
|
3
|
+
"thread-footer__inner": "_thread-footer__inner_1sd7m_8",
|
|
4
|
+
"thread-footer__avatars-group": "_thread-footer__avatars-group_1sd7m_14",
|
|
5
|
+
"thread-footer__status-hint": "_thread-footer__status-hint_1sd7m_19",
|
|
6
|
+
"thread-footer__badge-container": "_thread-footer__badge-container_1sd7m_30",
|
|
7
|
+
"thread-footer__unread-dot": "_thread-footer__unread-dot_1sd7m_39",
|
|
8
|
+
"thread-footer__mention-badge": "_thread-footer__mention-badge_1sd7m_46",
|
|
9
|
+
"thread-footer__buttons": "_thread-footer__buttons_1sd7m_49",
|
|
10
|
+
"thread-footer__reply-btn": "_thread-footer__reply-btn_1sd7m_54",
|
|
11
|
+
"thread-footer__follow-btn": "_thread-footer__follow-btn_1sd7m_54",
|
|
12
|
+
"thread-footer__follow-btn--following": "_thread-footer__follow-btn--following_1sd7m_57",
|
|
13
|
+
"thread-footer__reply-btn--hovered": "_thread-footer__reply-btn--hovered_1sd7m_63",
|
|
14
|
+
"thread-footer__btn-label": "_thread-footer__btn-label_1sd7m_73",
|
|
15
|
+
"thread-footer__divider": "_thread-footer__divider_1sd7m_80",
|
|
16
|
+
"thread-footer__last-reply-group": "_thread-footer__last-reply-group_1sd7m_93",
|
|
17
|
+
"thread-footer--following": "_thread-footer--following_1sd7m_112",
|
|
18
|
+
"thread-footer--hovered": "_thread-footer--hovered_1sd7m_112",
|
|
19
|
+
"thread-footer__last-reply": "_thread-footer__last-reply_1sd7m_93"
|
|
20
20
|
};
|
|
21
21
|
export {
|
|
22
22
|
_ as default
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),__b=require("@mattermost/compass-icons/components/dots-horizontal.js"),b=__b?.default??__b,M=require("../icon/Icon.cjs"),S=require("../icon-button/IconButton.cjs"),B=require("../tag/Tag.cjs"),D=require("../mention-badge/MentionBadge.cjs"),E=require("../unread-badge/UnreadBadge.cjs"),P=require("../user-avatar-group/UserAvatarGroup.cjs"),t=require("./ThreadListItem.module.scss.cjs"),z=[{key:"leonard",name:"Leonard Riley"},{key:"aiko",name:"Aiko Tan"},{key:"arjun",name:"Arjun Patel"},{key:"marco",name:"Marco Rinaldi"},{key:"sofia",name:"Sofia Bauer"}],L=s=>s===1?"1 reply":`${s} replies`,F=s=>`${s} mention${s===1?"":"s"}`;function K({active:s=!1,badge:r="none",mentionCount:n=1,authorName:_="Martin Kraft",channelLabel:f="ENTERPRISE TEAM",previewText:p="Do we have a guideline for what minimum width we should support in the system console? I know that…",timestamp:j="5 mins ago",replyCount:x=3,participants:d,threadTitle:o,className:N="",onClick:a,onMenuClick:u,formatReplyCount:v=L,formatMentionLabel:g=F,unreadLabel:y="unread",menuLabel:w="Thread actions"}){const c=d===void 0?z:d,T=c.length>0,m=!s&&(r==="unread"||r==="mention"),I=v(x),q=[t.default["thread-list-item"],s?t.default["thread-list-item--active"]:"",N].filter(Boolean).join(" "),h=r==="mention"?g(n):r==="unread"?y:void 0,A=i=>{const l=window.getSelection();(l==null?void 0:l.type)==="Range"&&l.toString().length>0&&i.currentTarget.contains(l.getRangeAt(0).commonAncestorContainer)||a==null||a()},R=i=>{i.key!=="Enter"&&i.key!==" "||(i.preventDefault(),a==null||a())};return e.jsxs("div",{className:q,children:[e.jsx("div",{className:t.default["thread-list-item__main"],role:a?"button":void 0,tabIndex:a?0:void 0,onClick:a?A:void 0,onKeyDown:a?R:void 0,"aria-current":s?!0:void 0,children:e.jsx("div",{className:t.default["thread-list-item__thread"],children:e.jsxs("div",{className:t.default["thread-list-item__container"],children:[e.jsxs("div",{className:t.default["thread-list-item__post-content"],children:[e.jsxs("div",{className:t.default["thread-list-item__gutter"],children:[m&&r==="unread"&&e.jsx("span",{className:t.default["thread-list-item__unread-gutter"],"aria-hidden":!0,children:e.jsx(E.default,{className:t.default["thread-list-item__unread-badge"],context:"icon-button"})}),m&&r==="mention"&&e.jsx("span",{className:t.default["thread-list-item__mention-gutter"],"aria-hidden":!0,children:e.jsx(D.default,{count:n,location:"channel",size:"medium"})})]}),e.jsx("div",{className:t.default["thread-list-item__post-body"],children:e.jsxs("div",{className:t.default["thread-list-item__post-body-content"],children:[e.jsxs("div",{className:t.default["thread-list-item__name-row"],children:[e.jsxs("div",{className:t.default["thread-list-item__name-group"],children:[e.jsx("span",{className:t.default["thread-list-item__author"],children:_}),e.jsx(B.default,{casing:"all-caps",label:f}),h&&e.jsx("span",{className:t.default["thread-list-item__status-hint"],children:h})]}),e.jsx("span",{className:t.default["thread-list-item__timestamp"],children:j})]}),o!=null&&e.jsx("div",{className:t.default["thread-list-item__title-row"],children:e.jsx("p",{className:t.default["thread-list-item__title"],children:o})}),e.jsx("p",{className:t.default["thread-list-item__preview"],children:p})]})})]}),e.jsx("div",{className:t.default["thread-list-item__replies"],children:e.jsxs("div",{className:t.default["thread-list-item__replies-inner"],children:[T&&e.jsx(P.default,{avatars:c,className:t.default["thread-list-item__avatar-group"],max:3,size:"20"}),e.jsx("span",{className:t.default["thread-list-item__reply-count"],children:I})]})})]})})}),u&&e.jsx("div",{className:t.default["thread-list-item__actions"],children:e.jsx("span",{className:t.default["thread-list-item__menu-button"],children:e.jsx(S.default,{"aria-label":w,icon:e.jsx(M.default,{size:"16",glyph:e.jsx(b,{})}),padding:"compact",size:"small",style:"default",type:"button",onClick:i=>{i.stopPropagation(),u(i)}})})})]})}exports.default=K;
|
|
2
2
|
//# sourceMappingURL=ThreadListItem.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadListItem.cjs","sources":["../../../src/components/thread-list-item/ThreadListItem.tsx"],"sourcesContent":["import DotsHorizontalIcon from '@mattermost/compass-icons/components/dots-horizontal';\nimport type { KeyboardEvent, MouseEvent } from 'react';\nimport Icon from '@/components/icon/Icon';\nimport IconButton from '@/components/icon-button/IconButton';\nimport Tag from '@/components/tag/Tag';\nimport MentionBadge from '../mention-badge/MentionBadge';\nimport UnreadBadge from '../unread-badge/UnreadBadge';\nimport UserAvatarGroup, {\n type UserAvatarGroupItem,\n} from '../user-avatar-group/UserAvatarGroup';\nimport styles from './ThreadListItem.module.scss';\n\nconst DEFAULT_PARTICIPANTS: UserAvatarGroupItem[] = [\n { key: 'leonard', name: 'Leonard Riley' },\n { key: 'aiko', name: 'Aiko Tan' },\n { key: 'arjun', name: 'Arjun Patel' },\n { key: 'marco', name: 'Marco Rinaldi' },\n { key: 'sofia', name: 'Sofia Bauer' },\n];\n\nexport interface ThreadListItemProps {\n /** Whether this item is the active/selected thread. */\n active?: boolean;\n /** Badge in the left gutter. Default: None. Hidden when `active` is true. */\n badge?: 'none' | 'unread' | 'mention';\n /** Shown when `badge` is Mention. Default: 1. */\n mentionCount?: number;\n /** Author name. */\n authorName?: string;\n /** Channel/team label. */\n channelLabel?: string;\n /** Message preview text. */\n previewText?: string;\n /** Timestamp label. */\n timestamp?: string;\n /** Number of replies. */\n replyCount?: number;\n /** Stacked avatars for recent participants. Pass `[]` to hide. When omitted, uses demo participants. */\n participants?: UserAvatarGroupItem[];\n /** Optional thread title. */\n threadTitle?: string;\n /** Optional CSS class name. */\n className?: string;\n /** Opens the thread. Sibling of the overflow menu for keyboard reachability. */\n onClick?: () => void;\n /** Thread overflow menu handler. */\n onMenuClick?: (event: MouseEvent<HTMLButtonElement>) => void;\n}\n\n/**\n * The Thread List Item is a single entry in the Threads view. Each row gives the user enough\n * context — who, where, what, when — to decide whether to open the thread without opening\n * it.\n */\nexport default function ThreadListItem({\n active = false,\n badge = 'none',\n mentionCount = 1,\n authorName = 'Martin Kraft',\n channelLabel = 'ENTERPRISE TEAM',\n previewText = 'Do we have a guideline for what minimum width we should support in the system console? I know that…',\n timestamp = '5 mins ago',\n replyCount = 3,\n participants: participantsProp,\n threadTitle,\n className = '',\n onClick,\n onMenuClick,\n}: ThreadListItemProps) {\n const participants =\n participantsProp === undefined ? DEFAULT_PARTICIPANTS : participantsProp;\n const showParticipants = participants.length > 0;\n const showGutterBadge =\n !active && (badge === 'unread' || badge === 'mention');\n const replyLabel = replyCount === 1 ? '1 reply' : `${replyCount} replies`;\n\n const rootClass = [\n styles['thread-list-item'],\n active ? styles['thread-list-item--active'] : '',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n const statusHint =\n badge === 'mention'\n ? `${mentionCount} mention${mentionCount === 1 ? '' : 's'}`\n : badge === 'unread'\n ? 'unread'\n : undefined;\n\n const handleMainClick = (event: MouseEvent<HTMLDivElement>) => {\n const selection = window.getSelection();\n if (\n selection?.type === 'Range' &&\n selection.toString().length > 0 &&\n event.currentTarget.contains(\n selection.getRangeAt(0).commonAncestorContainer,\n )\n ) {\n return;\n }\n onClick?.();\n };\n\n const handleMainKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n if (event.key !== 'Enter' && event.key !== ' ') {\n return;\n }\n event.preventDefault();\n onClick?.();\n };\n\n return (\n <div className={rootClass}>\n <div\n className={styles['thread-list-item__main']}\n role={onClick ? 'button' : undefined}\n tabIndex={onClick ? 0 : undefined}\n onClick={onClick ? handleMainClick : undefined}\n onKeyDown={onClick ? handleMainKeyDown : undefined}\n aria-current={active ? true : undefined}\n >\n <div className={styles['thread-list-item__thread']}>\n <div className={styles['thread-list-item__container']}>\n <div className={styles['thread-list-item__post-content']}>\n <div className={styles['thread-list-item__gutter']}>\n {showGutterBadge && badge === 'unread' && (\n <span\n className={styles['thread-list-item__unread-gutter']}\n aria-hidden\n >\n <UnreadBadge\n className={styles['thread-list-item__unread-badge']}\n context=\"icon-button\"\n />\n </span>\n )}\n {showGutterBadge && badge === 'mention' && (\n <span\n className={styles['thread-list-item__mention-gutter']}\n aria-hidden\n >\n <MentionBadge\n count={mentionCount}\n location=\"channel\"\n size=\"medium\"\n />\n </span>\n )}\n </div>\n <div className={styles['thread-list-item__post-body']}>\n <div className={styles['thread-list-item__post-body-content']}>\n <div className={styles['thread-list-item__name-row']}>\n <div className={styles['thread-list-item__name-group']}>\n <span className={styles['thread-list-item__author']}>\n {authorName}\n </span>\n <Tag casing=\"all-caps\" label={channelLabel} />\n {statusHint && (\n <span\n className={styles['thread-list-item__status-hint']}\n >\n {statusHint}\n </span>\n )}\n </div>\n <span className={styles['thread-list-item__timestamp']}>\n {timestamp}\n </span>\n </div>\n {threadTitle != null && (\n <div className={styles['thread-list-item__title-row']}>\n <p className={styles['thread-list-item__title']}>\n {threadTitle}\n </p>\n </div>\n )}\n <p className={styles['thread-list-item__preview']}>\n {previewText}\n </p>\n </div>\n </div>\n </div>\n <div className={styles['thread-list-item__replies']}>\n <div className={styles['thread-list-item__replies-inner']}>\n {showParticipants && (\n <UserAvatarGroup\n avatars={participants}\n className={styles['thread-list-item__avatar-group']}\n max={3}\n size=\"20\"\n />\n )}\n <span className={styles['thread-list-item__reply-count']}>\n {replyLabel}\n </span>\n </div>\n </div>\n </div>\n </div>\n </div>\n {onMenuClick && (\n <div className={styles['thread-list-item__actions']}>\n <span className={styles['thread-list-item__menu-button']}>\n <IconButton\n aria-label=\"Thread actions\"\n icon={<Icon size=\"16\" glyph={<DotsHorizontalIcon />} />}\n padding=\"compact\"\n size=\"small\"\n style=\"default\"\n type=\"button\"\n onClick={(event) => {\n event.stopPropagation();\n onMenuClick(event);\n }}\n />\n </span>\n </div>\n )}\n </div>\n );\n}\n"],"names":["DEFAULT_PARTICIPANTS","ThreadListItem","active","badge","mentionCount","authorName","channelLabel","previewText","timestamp","replyCount","participantsProp","threadTitle","className","onClick","onMenuClick","participants","showParticipants","showGutterBadge","replyLabel","rootClass","styles","statusHint","handleMainClick","event","selection","handleMainKeyDown","jsxs","jsx","UnreadBadge","MentionBadge","Tag","UserAvatarGroup","IconButton","Icon","DotsHorizontalIcon"],"mappings":"mfAYMA,EAA8C,CAClD,CAAE,IAAK,UAAW,KAAM,eAAA,EACxB,CAAE,IAAK,OAAQ,KAAM,UAAA,EACrB,CAAE,IAAK,QAAS,KAAM,aAAA,EACtB,CAAE,IAAK,QAAS,KAAM,eAAA,EACtB,CAAE,IAAK,QAAS,KAAM,aAAA,CACxB,EAoCA,SAAwBC,EAAe,CACrC,OAAAC,EAAS,GACT,MAAAC,EAAQ,OACR,aAAAC,EAAe,EACf,WAAAC,EAAa,eACb,aAAAC,EAAe,kBACf,YAAAC,EAAc,sGACd,UAAAC,EAAY,aACZ,WAAAC,EAAa,EACb,aAAcC,EACd,YAAAC,EACA,UAAAC,EAAY,GACZ,QAAAC,EACA,YAAAC,CACF,EAAwB,CACtB,MAAMC,EACJL,IAAqB,OAAYV,EAAuBU,EACpDM,EAAmBD,EAAa,OAAS,EACzCE,EACJ,CAACf,IAAWC,IAAU,UAAYA,IAAU,WACxCe,EAAaT,IAAe,EAAI,UAAY,GAAGA,CAAU,WAEzDU,EAAY,CAChBC,EAAAA,Q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AiC,EACrD,SAAA,CAAAJ,GACCW,EAAAA,IAACI,EAAAA,QAAA,CACC,QAAShB,EACT,UAAWK,EAAAA,QAAO,gCAAgC,EAClD,IAAK,EACL,KAAK,IAAA,CAAA,QAGR,OAAA,CAAK,UAAWA,EAAAA,QAAO,+BAA+B,EACpD,SAAAF,CAAA,CACH,CAAA,CAAA,CACF,CAAA,CACF,CAAA,CAAA,CACF,CAAA,CACF,CAAA,CAAA,EAEDJ,GACCa,EAAAA,IAAC,MAAA,CAAI,UAAWP,EAAAA,QAAO,2BAA2B,EAChD,SAAAO,EAAAA,IAAC,OAAA,CAAK,UAAWP,EAAAA,QAAO,+BAA+B,EACrD,SAAAO,EAAAA,IAACK,EAAAA,QAAA,CACC,aAAW,iBACX,WAAOC,UAAA,CAAK,KAAK,KAAK,MAAON,MAACO,IAAmB,EAAI,EACrD,QAAQ,UACR,KAAK,QACL,MAAM,UACN,KAAK,SACL,QAAUX,GAAU,CAClBA,EAAM,gBAAA,EACNT,EAAYS,CAAK,CACnB,CAAA,CAAA,EAEJ,CAAA,CACF,CAAA,EAEJ,CAEJ"}
|
|
1
|
+
{"version":3,"file":"ThreadListItem.cjs","sources":["../../../src/components/thread-list-item/ThreadListItem.tsx"],"sourcesContent":["import DotsHorizontalIcon from '@mattermost/compass-icons/components/dots-horizontal';\nimport type { KeyboardEvent, MouseEvent, ReactNode } from 'react';\nimport Icon from '@/components/icon/Icon';\nimport IconButton from '@/components/icon-button/IconButton';\nimport Tag from '@/components/tag/Tag';\nimport MentionBadge from '../mention-badge/MentionBadge';\nimport UnreadBadge from '../unread-badge/UnreadBadge';\nimport UserAvatarGroup, {\n type UserAvatarGroupItem,\n} from '../user-avatar-group/UserAvatarGroup';\nimport styles from './ThreadListItem.module.scss';\n\nconst DEFAULT_PARTICIPANTS: UserAvatarGroupItem[] = [\n { key: 'leonard', name: 'Leonard Riley' },\n { key: 'aiko', name: 'Aiko Tan' },\n { key: 'arjun', name: 'Arjun Patel' },\n { key: 'marco', name: 'Marco Rinaldi' },\n { key: 'sofia', name: 'Sofia Bauer' },\n];\n\nexport interface ThreadListItemProps {\n /** Whether this item is the active/selected thread. */\n active?: boolean;\n /** Badge in the left gutter. Default: None. Hidden when `active` is true. */\n badge?: 'none' | 'unread' | 'mention';\n /** Shown when `badge` is Mention. Default: 1. */\n mentionCount?: number;\n /** Author name. */\n authorName?: ReactNode;\n /** Channel/team label. */\n channelLabel?: ReactNode;\n /** Message preview text. */\n previewText?: ReactNode;\n /** Timestamp label. */\n timestamp?: ReactNode;\n /** Number of replies. */\n replyCount?: number;\n /** Stacked avatars for recent participants. Pass `[]` to hide. When omitted, uses demo participants. */\n participants?: UserAvatarGroupItem[];\n /** Optional thread title. */\n threadTitle?: ReactNode;\n /** Optional CSS class name. */\n className?: string;\n /** Opens the thread. Sibling of the overflow menu for keyboard reachability. */\n onClick?: () => void;\n /** Thread overflow menu handler. */\n onMenuClick?: (event: MouseEvent<HTMLButtonElement>) => void;\n /** Visible reply count. Default: `1 reply` / `{count} replies`. */\n formatReplyCount?: (count: number) => ReactNode;\n /** Visually hidden mention hint. Default: `{count} mention(s)`. */\n formatMentionLabel?: (count: number) => ReactNode;\n /** Visually hidden unread hint. Default: \"unread\". */\n unreadLabel?: ReactNode;\n /** Accessible name for the overflow menu button. Default: \"Thread actions\". */\n menuLabel?: string;\n}\n\nconst defaultFormatReplies = (count: number) =>\n count === 1 ? '1 reply' : `${count} replies`;\nconst defaultFormatMentions = (count: number) =>\n `${count} mention${count === 1 ? '' : 's'}`;\n\n/**\n * The Thread List Item is a single entry in the Threads view. Each row gives the user enough\n * context — who, where, what, when — to decide whether to open the thread without opening\n * it.\n */\nexport default function ThreadListItem({\n active = false,\n badge = 'none',\n mentionCount = 1,\n authorName = 'Martin Kraft',\n channelLabel = 'ENTERPRISE TEAM',\n previewText = 'Do we have a guideline for what minimum width we should support in the system console? I know that…',\n timestamp = '5 mins ago',\n replyCount = 3,\n participants: participantsProp,\n threadTitle,\n className = '',\n onClick,\n onMenuClick,\n formatReplyCount = defaultFormatReplies,\n formatMentionLabel = defaultFormatMentions,\n unreadLabel = 'unread',\n menuLabel = 'Thread actions',\n}: ThreadListItemProps) {\n const participants =\n participantsProp === undefined ? DEFAULT_PARTICIPANTS : participantsProp;\n const showParticipants = participants.length > 0;\n const showGutterBadge =\n !active && (badge === 'unread' || badge === 'mention');\n const replyLabel = formatReplyCount(replyCount);\n\n const rootClass = [\n styles['thread-list-item'],\n active ? styles['thread-list-item--active'] : '',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n const statusHint =\n badge === 'mention'\n ? formatMentionLabel(mentionCount)\n : badge === 'unread'\n ? unreadLabel\n : undefined;\n\n const handleMainClick = (event: MouseEvent<HTMLDivElement>) => {\n const selection = window.getSelection();\n if (\n selection?.type === 'Range' &&\n selection.toString().length > 0 &&\n event.currentTarget.contains(\n selection.getRangeAt(0).commonAncestorContainer,\n )\n ) {\n return;\n }\n onClick?.();\n };\n\n const handleMainKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n if (event.key !== 'Enter' && event.key !== ' ') {\n return;\n }\n event.preventDefault();\n onClick?.();\n };\n\n return (\n <div className={rootClass}>\n <div\n className={styles['thread-list-item__main']}\n role={onClick ? 'button' : undefined}\n tabIndex={onClick ? 0 : undefined}\n onClick={onClick ? handleMainClick : undefined}\n onKeyDown={onClick ? handleMainKeyDown : undefined}\n aria-current={active ? true : undefined}\n >\n <div className={styles['thread-list-item__thread']}>\n <div className={styles['thread-list-item__container']}>\n <div className={styles['thread-list-item__post-content']}>\n <div className={styles['thread-list-item__gutter']}>\n {showGutterBadge && badge === 'unread' && (\n <span\n className={styles['thread-list-item__unread-gutter']}\n aria-hidden\n >\n <UnreadBadge\n className={styles['thread-list-item__unread-badge']}\n context=\"icon-button\"\n />\n </span>\n )}\n {showGutterBadge && badge === 'mention' && (\n <span\n className={styles['thread-list-item__mention-gutter']}\n aria-hidden\n >\n <MentionBadge\n count={mentionCount}\n location=\"channel\"\n size=\"medium\"\n />\n </span>\n )}\n </div>\n <div className={styles['thread-list-item__post-body']}>\n <div className={styles['thread-list-item__post-body-content']}>\n <div className={styles['thread-list-item__name-row']}>\n <div className={styles['thread-list-item__name-group']}>\n <span className={styles['thread-list-item__author']}>\n {authorName}\n </span>\n <Tag casing=\"all-caps\" label={channelLabel} />\n {statusHint && (\n <span\n className={styles['thread-list-item__status-hint']}\n >\n {statusHint}\n </span>\n )}\n </div>\n <span className={styles['thread-list-item__timestamp']}>\n {timestamp}\n </span>\n </div>\n {threadTitle != null && (\n <div className={styles['thread-list-item__title-row']}>\n <p className={styles['thread-list-item__title']}>\n {threadTitle}\n </p>\n </div>\n )}\n <p className={styles['thread-list-item__preview']}>\n {previewText}\n </p>\n </div>\n </div>\n </div>\n <div className={styles['thread-list-item__replies']}>\n <div className={styles['thread-list-item__replies-inner']}>\n {showParticipants && (\n <UserAvatarGroup\n avatars={participants}\n className={styles['thread-list-item__avatar-group']}\n max={3}\n size=\"20\"\n />\n )}\n <span className={styles['thread-list-item__reply-count']}>\n {replyLabel}\n </span>\n </div>\n </div>\n </div>\n </div>\n </div>\n {onMenuClick && (\n <div className={styles['thread-list-item__actions']}>\n <span className={styles['thread-list-item__menu-button']}>\n <IconButton\n aria-label={menuLabel}\n icon={<Icon size=\"16\" glyph={<DotsHorizontalIcon />} />}\n padding=\"compact\"\n size=\"small\"\n style=\"default\"\n type=\"button\"\n onClick={(event) => {\n event.stopPropagation();\n onMenuClick(event);\n }}\n />\n </span>\n </div>\n )}\n </div>\n );\n}\n"],"names":["DEFAULT_PARTICIPANTS","defaultFormatReplies","count","defaultFormatMentions","ThreadListItem","active","badge","mentionCount","authorName","channelLabel","previewText","timestamp","replyCount","participantsProp","threadTitle","className","onClick","onMenuClick","formatReplyCount","formatMentionLabel","unreadLabel","menuLabel","participants","showParticipants","showGutterBadge","replyLabel","rootClass","styles","statusHint","handleMainClick","event","selection","handleMainKeyDown","jsxs","jsx","UnreadBadge","MentionBadge","Tag","User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AA,IAAC,OAAA,CAAK,UAAWP,EAAAA,QAAO,+BAA+B,EACrD,SAAAO,EAAAA,IAACK,EAAAA,QAAA,CACC,aAAYlB,EACZ,WAAOmB,UAAA,CAAK,KAAK,KAAK,MAAON,MAACO,IAAmB,EAAI,EACrD,QAAQ,UACR,KAAK,QACL,MAAM,UACN,KAAK,SACL,QAAUX,GAAU,CAClBA,EAAM,gBAAA,EACNb,EAAYa,CAAK,CACnB,CAAA,CAAA,EAEJ,CAAA,CACF,CAAA,EAEJ,CAEJ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MouseEvent } from 'react';
|
|
1
|
+
import { MouseEvent, ReactNode } from 'react';
|
|
2
2
|
import { UserAvatarGroupItem } from '../user-avatar-group/UserAvatarGroup';
|
|
3
3
|
export interface ThreadListItemProps {
|
|
4
4
|
/** Whether this item is the active/selected thread. */
|
|
@@ -8,30 +8,38 @@ export interface ThreadListItemProps {
|
|
|
8
8
|
/** Shown when `badge` is Mention. Default: 1. */
|
|
9
9
|
mentionCount?: number;
|
|
10
10
|
/** Author name. */
|
|
11
|
-
authorName?:
|
|
11
|
+
authorName?: ReactNode;
|
|
12
12
|
/** Channel/team label. */
|
|
13
|
-
channelLabel?:
|
|
13
|
+
channelLabel?: ReactNode;
|
|
14
14
|
/** Message preview text. */
|
|
15
|
-
previewText?:
|
|
15
|
+
previewText?: ReactNode;
|
|
16
16
|
/** Timestamp label. */
|
|
17
|
-
timestamp?:
|
|
17
|
+
timestamp?: ReactNode;
|
|
18
18
|
/** Number of replies. */
|
|
19
19
|
replyCount?: number;
|
|
20
20
|
/** Stacked avatars for recent participants. Pass `[]` to hide. When omitted, uses demo participants. */
|
|
21
21
|
participants?: UserAvatarGroupItem[];
|
|
22
22
|
/** Optional thread title. */
|
|
23
|
-
threadTitle?:
|
|
23
|
+
threadTitle?: ReactNode;
|
|
24
24
|
/** Optional CSS class name. */
|
|
25
25
|
className?: string;
|
|
26
26
|
/** Opens the thread. Sibling of the overflow menu for keyboard reachability. */
|
|
27
27
|
onClick?: () => void;
|
|
28
28
|
/** Thread overflow menu handler. */
|
|
29
29
|
onMenuClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
30
|
+
/** Visible reply count. Default: `1 reply` / `{count} replies`. */
|
|
31
|
+
formatReplyCount?: (count: number) => ReactNode;
|
|
32
|
+
/** Visually hidden mention hint. Default: `{count} mention(s)`. */
|
|
33
|
+
formatMentionLabel?: (count: number) => ReactNode;
|
|
34
|
+
/** Visually hidden unread hint. Default: "unread". */
|
|
35
|
+
unreadLabel?: ReactNode;
|
|
36
|
+
/** Accessible name for the overflow menu button. Default: "Thread actions". */
|
|
37
|
+
menuLabel?: string;
|
|
30
38
|
}
|
|
31
39
|
/**
|
|
32
40
|
* The Thread List Item is a single entry in the Threads view. Each row gives the user enough
|
|
33
41
|
* context — who, where, what, when — to decide whether to open the thread without opening
|
|
34
42
|
* it.
|
|
35
43
|
*/
|
|
36
|
-
export default function ThreadListItem({ active, badge, mentionCount, authorName, channelLabel, previewText, timestamp, replyCount, participants: participantsProp, threadTitle, className, onClick, onMenuClick, }: ThreadListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
export default function ThreadListItem({ active, badge, mentionCount, authorName, channelLabel, previewText, timestamp, replyCount, participants: participantsProp, threadTitle, className, onClick, onMenuClick, formatReplyCount, formatMentionLabel, unreadLabel, menuLabel, }: ThreadListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
37
45
|
//# sourceMappingURL=ThreadListItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadListItem.d.ts","sourceRoot":"","sources":["../../../src/components/thread-list-item/ThreadListItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,UAAU,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ThreadListItem.d.ts","sourceRoot":"","sources":["../../../src/components/thread-list-item/ThreadListItem.tsx"],"names":[],"mappings":"AACA,OA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