@mattermost/compass-ui 0.1.0-alpha.27 → 0.1.0-alpha.28
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/dist/compass-ui.css +16 -0
- package/dist/components/admin-console-footer/AdminConsoleFooter.css +1 -1
- package/dist/components/admin-console-footer/AdminConsoleFooter.module.scss.cjs +1 -1
- package/dist/components/admin-console-footer/AdminConsoleFooter.module.scss.js +7 -7
- package/dist/components/admin-console-header/AdminConsoleHeader.css +1 -1
- package/dist/components/admin-console-header/AdminConsoleHeader.module.scss.cjs +1 -1
- package/dist/components/admin-console-header/AdminConsoleHeader.module.scss.js +8 -8
- package/dist/components/admin-panel/AdminPanel.css +1 -1
- package/dist/components/admin-panel/AdminPanel.module.scss.cjs +1 -1
- package/dist/components/admin-panel/AdminPanel.module.scss.js +5 -5
- package/dist/components/admin-panel-footer/AdminPanelFooter.css +1 -1
- package/dist/components/admin-panel-footer/AdminPanelFooter.module.scss.cjs +1 -1
- package/dist/components/admin-panel-footer/AdminPanelFooter.module.scss.js +5 -5
- 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 +6 -0
- package/dist/components/admin-panel-header/AdminPanelHeader.d.ts.map +1 -1
- package/dist/components/admin-panel-header/AdminPanelHeader.js +145 -109
- 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 +11 -10
- package/dist/components/admin-panel-header/AdminPanelHeader.module.scss.js.map +1 -1
- package/dist/components/attachment-card/AttachmentCard.css +1 -1
- package/dist/components/attachment-card/AttachmentCard.module.scss.cjs +1 -1
- package/dist/components/attachment-card/AttachmentCard.module.scss.js +22 -19
- package/dist/components/attachment-card/AttachmentCard.module.scss.js.map +1 -1
- package/dist/components/button/Button.css +1 -1
- package/dist/components/button/Button.module.scss.cjs +1 -1
- package/dist/components/button/Button.module.scss.js +20 -19
- package/dist/components/button/Button.module.scss.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/card-button/CardButtonGroup.css +1 -1
- package/dist/components/card-button/CardButtonGroup.module.scss.cjs +1 -1
- package/dist/components/card-button/CardButtonGroup.module.scss.js +1 -1
- package/dist/components/channel-info-msg-header/ChannelInfoMsgHeader.css +1 -1
- package/dist/components/channel-info-msg-header/ChannelInfoMsgHeader.module.scss.cjs +1 -1
- package/dist/components/channel-info-msg-header/ChannelInfoMsgHeader.module.scss.js +8 -8
- 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.css +1 -1
- package/dist/components/channel-sidebar-item/ChannelSidebarItem.d.ts +66 -7
- package/dist/components/channel-sidebar-item/ChannelSidebarItem.d.ts.map +1 -1
- package/dist/components/channel-sidebar-item/ChannelSidebarItem.js +163 -93
- package/dist/components/channel-sidebar-item/ChannelSidebarItem.js.map +1 -1
- package/dist/components/channel-sidebar-item/ChannelSidebarItem.module.scss.cjs +1 -1
- package/dist/components/channel-sidebar-item/ChannelSidebarItem.module.scss.js +35 -22
- package/dist/components/channel-sidebar-item/ChannelSidebarItem.module.scss.js.map +1 -1
- package/dist/components/checkbox/Checkbox.css +1 -1
- package/dist/components/checkbox/Checkbox.module.scss.cjs +1 -1
- package/dist/components/checkbox/Checkbox.module.scss.js +7 -7
- package/dist/components/chip/Chip.cjs +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.map +1 -1
- package/dist/components/chip/Chip.js +8 -8
- 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 +13 -10
- package/dist/components/chip/Chip.module.scss.js.map +1 -1
- package/dist/components/chip/ChipGroup.cjs +1 -1
- package/dist/components/chip/ChipGroup.cjs.map +1 -1
- package/dist/components/chip/ChipGroup.css +1 -1
- package/dist/components/chip/ChipGroup.d.ts +1 -1
- package/dist/components/chip/ChipGroup.d.ts.map +1 -1
- package/dist/components/chip/ChipGroup.js +30 -30
- package/dist/components/chip/ChipGroup.js.map +1 -1
- package/dist/components/chip/ChipGroup.module.scss.cjs +1 -1
- package/dist/components/chip/ChipGroup.module.scss.js +1 -1
- 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 +10 -0
- package/dist/components/combobox/Combobox.d.ts.map +1 -1
- package/dist/components/combobox/Combobox.js +269 -252
- 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 +34 -31
- 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 +14 -1
- package/dist/components/date-range-picker/DateRangePicker.d.ts.map +1 -1
- package/dist/components/date-range-picker/DateRangePicker.js +217 -195
- 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 +29 -26
- package/dist/components/date-range-picker/DateRangePicker.module.scss.js.map +1 -1
- package/dist/components/divider/Divider.css +1 -1
- package/dist/components/divider/Divider.module.scss.cjs +1 -1
- package/dist/components/divider/Divider.module.scss.js +1 -1
- package/dist/components/dropdown/Dropdown.css +1 -1
- package/dist/components/dropdown/Dropdown.module.scss.cjs +1 -1
- package/dist/components/dropdown/Dropdown.module.scss.js +23 -22
- package/dist/components/dropdown/Dropdown.module.scss.js.map +1 -1
- package/dist/components/emoji/Emoji.css +1 -1
- package/dist/components/emoji/Emoji.module.scss.cjs +1 -1
- package/dist/components/emoji/Emoji.module.scss.js +12 -12
- package/dist/components/emoji-button/EmojiButton.css +1 -1
- package/dist/components/emoji-button/EmojiButton.module.scss.cjs +1 -1
- package/dist/components/emoji-button/EmojiButton.module.scss.js +12 -9
- package/dist/components/emoji-button/EmojiButton.module.scss.js.map +1 -1
- package/dist/components/emoji-popover/EmojiPopover.css +1 -1
- package/dist/components/emoji-popover/EmojiPopover.module.scss.cjs +1 -1
- package/dist/components/emoji-popover/EmojiPopover.module.scss.js +21 -21
- package/dist/components/empty-state/EmptyState.css +1 -1
- package/dist/components/empty-state/EmptyState.module.scss.cjs +1 -1
- package/dist/components/empty-state/EmptyState.module.scss.js +7 -7
- package/dist/components/feature-discovery-panel/FeatureDiscoveryPanel.css +1 -1
- package/dist/components/feature-discovery-panel/FeatureDiscoveryPanel.module.scss.cjs +1 -1
- package/dist/components/feature-discovery-panel/FeatureDiscoveryPanel.module.scss.js +9 -9
- package/dist/components/field/FieldClearButton.css +1 -1
- package/dist/components/field/FieldClearButton.module.scss.cjs +1 -1
- package/dist/components/field/FieldClearButton.module.scss.js +3 -3
- package/dist/components/field-message/FieldMessage.css +1 -1
- package/dist/components/field-message/FieldMessage.module.scss.cjs +1 -1
- package/dist/components/field-message/FieldMessage.module.scss.js +7 -7
- package/dist/components/global-banner/GlobalBanner.css +1 -1
- package/dist/components/global-banner/GlobalBanner.module.scss.cjs +1 -1
- package/dist/components/global-banner/GlobalBanner.module.scss.js +10 -10
- package/dist/components/icon/Icon.css +1 -1
- package/dist/components/icon/Icon.module.scss.cjs +1 -1
- package/dist/components/icon/Icon.module.scss.js +13 -13
- 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 +19 -16
- package/dist/components/icon-button/IconButton.module.scss.js.map +1 -1
- package/dist/components/illustration/Illustration.css +1 -1
- package/dist/components/illustration/Illustration.module.scss.cjs +1 -1
- package/dist/components/illustration/Illustration.module.scss.js +1 -1
- package/dist/components/image-preview/ImagePreview.css +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.css +1 -1
- package/dist/components/link-preview/LinkPreview.module.scss.cjs +1 -1
- package/dist/components/link-preview/LinkPreview.module.scss.js +14 -14
- package/dist/components/mention-badge/MentionBadge.css +1 -1
- package/dist/components/mention-badge/MentionBadge.module.scss.cjs +1 -1
- package/dist/components/mention-badge/MentionBadge.module.scss.js +9 -9
- package/dist/components/menu-group-heading/MenuGroupHeading.css +1 -1
- package/dist/components/menu-group-heading/MenuGroupHeading.module.scss.cjs +1 -1
- package/dist/components/menu-group-heading/MenuGroupHeading.module.scss.js +2 -2
- package/dist/components/menu-item/MenuItem.css +1 -1
- package/dist/components/menu-item/MenuItem.module.scss.cjs +1 -1
- package/dist/components/menu-item/MenuItem.module.scss.js +18 -18
- package/dist/components/message-actions/MessageActions.css +1 -1
- package/dist/components/message-actions/MessageActions.module.scss.cjs +1 -1
- package/dist/components/message-actions/MessageActions.module.scss.js +2 -2
- package/dist/components/message-header/MessageHeader.css +1 -1
- package/dist/components/message-header/MessageHeader.module.scss.cjs +1 -1
- package/dist/components/message-header/MessageHeader.module.scss.js +3 -3
- package/dist/components/message-separator/MessageSeparator.css +1 -1
- package/dist/components/message-separator/MessageSeparator.module.scss.cjs +1 -1
- package/dist/components/message-separator/MessageSeparator.module.scss.js +11 -11
- package/dist/components/modal/Modal.cjs +1 -1
- package/dist/components/modal/Modal.cjs.map +1 -1
- package/dist/components/modal/Modal.css +1 -1
- package/dist/components/modal/Modal.d.ts +11 -1
- package/dist/components/modal/Modal.d.ts.map +1 -1
- package/dist/components/modal/Modal.js +38 -36
- package/dist/components/modal/Modal.js.map +1 -1
- package/dist/components/modal/Modal.module.scss.cjs +1 -1
- package/dist/components/modal/Modal.module.scss.js +11 -11
- package/dist/components/modal/ModalOverlay.css +1 -1
- package/dist/components/modal/ModalOverlay.module.scss.cjs +1 -1
- package/dist/components/modal/ModalOverlay.module.scss.js +5 -5
- package/dist/components/modal-footer/ModalFooter.css +1 -1
- package/dist/components/modal-footer/ModalFooter.module.scss.cjs +1 -1
- package/dist/components/modal-footer/ModalFooter.module.scss.js +11 -11
- 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 +13 -3
- package/dist/components/modal-header/ModalHeader.d.ts.map +1 -1
- package/dist/components/modal-header/ModalHeader.js +61 -55
- 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 +18 -16
- package/dist/components/modal-header/ModalHeader.module.scss.js.map +1 -1
- package/dist/components/more-unreads-banner/MoreUnreadsBanner.css +1 -1
- package/dist/components/more-unreads-banner/MoreUnreadsBanner.module.scss.cjs +1 -1
- package/dist/components/more-unreads-banner/MoreUnreadsBanner.module.scss.js +8 -5
- package/dist/components/more-unreads-banner/MoreUnreadsBanner.module.scss.js.map +1 -1
- package/dist/components/new-message-banner/NewMessageBanner.css +1 -1
- package/dist/components/new-message-banner/NewMessageBanner.module.scss.cjs +1 -1
- package/dist/components/new-message-banner/NewMessageBanner.module.scss.js +9 -9
- package/dist/components/pagination-dots/PaginationDots.css +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/password-input/PasswordInput.css +1 -1
- package/dist/components/password-input/PasswordInput.module.scss.cjs +1 -1
- package/dist/components/password-input/PasswordInput.module.scss.js +15 -14
- package/dist/components/password-input/PasswordInput.module.scss.js.map +1 -1
- package/dist/components/permalink-preview/PermalinkPreview.css +1 -1
- package/dist/components/permalink-preview/PermalinkPreview.module.scss.cjs +1 -1
- package/dist/components/permalink-preview/PermalinkPreview.module.scss.js +13 -13
- package/dist/components/pinned-saved-indicators/PinnedSavedIndicators.css +1 -1
- package/dist/components/pinned-saved-indicators/PinnedSavedIndicators.module.scss.cjs +1 -1
- package/dist/components/pinned-saved-indicators/PinnedSavedIndicators.module.scss.js +7 -7
- package/dist/components/popover-menu/PopoverMenu.css +1 -1
- package/dist/components/popover-menu/PopoverMenu.module.scss.cjs +1 -1
- package/dist/components/popover-menu/PopoverMenu.module.scss.js +13 -13
- package/dist/components/popover-notice/PopoverNotice.css +1 -1
- package/dist/components/popover-notice/PopoverNotice.module.scss.cjs +1 -1
- package/dist/components/popover-notice/PopoverNotice.module.scss.js +14 -14
- package/dist/components/profile-popover/ProfilePopover.css +1 -1
- package/dist/components/profile-popover/ProfilePopover.module.scss.cjs +1 -1
- package/dist/components/profile-popover/ProfilePopover.module.scss.js +33 -33
- package/dist/components/progress-bar/ProgressBar.css +1 -1
- package/dist/components/progress-bar/ProgressBar.module.scss.cjs +1 -1
- package/dist/components/progress-bar/ProgressBar.module.scss.js +9 -9
- 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.css +1 -1
- package/dist/components/reaction-button/ReactionButton.module.scss.cjs +1 -1
- package/dist/components/reaction-button/ReactionButton.module.scss.js +8 -8
- package/dist/components/reactions-row/ReactionsRow.css +1 -1
- package/dist/components/reactions-row/ReactionsRow.module.scss.cjs +1 -1
- package/dist/components/reactions-row/ReactionsRow.module.scss.js +8 -8
- 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.css +1 -1
- package/dist/components/right-sidebar-header/RightSidebarHeader.d.ts.map +1 -1
- package/dist/components/right-sidebar-header/RightSidebarHeader.js +39 -36
- package/dist/components/right-sidebar-header/RightSidebarHeader.js.map +1 -1
- package/dist/components/right-sidebar-header/RightSidebarHeader.module.scss.cjs +1 -1
- package/dist/components/right-sidebar-header/RightSidebarHeader.module.scss.js +12 -13
- package/dist/components/right-sidebar-header/RightSidebarHeader.module.scss.js.map +1 -1
- package/dist/components/scrollbar/Scrollbar.css +1 -1
- package/dist/components/scrollbar/Scrollbar.module.scss.cjs +1 -1
- package/dist/components/scrollbar/Scrollbar.module.scss.js +5 -5
- package/dist/components/search-input/SearchInput.css +1 -1
- package/dist/components/search-input/SearchInput.module.scss.cjs +1 -1
- package/dist/components/search-input/SearchInput.module.scss.js +15 -15
- package/dist/components/search-tip-banner/SearchTipBanner.css +1 -1
- package/dist/components/search-tip-banner/SearchTipBanner.module.scss.cjs +1 -1
- package/dist/components/search-tip-banner/SearchTipBanner.module.scss.js +3 -3
- package/dist/components/section-notice/SectionNotice.css +1 -1
- package/dist/components/section-notice/SectionNotice.module.scss.cjs +1 -1
- package/dist/components/section-notice/SectionNotice.module.scss.js +12 -12
- package/dist/components/segmented-control/SegmentedControl.cjs +2 -0
- package/dist/components/segmented-control/SegmentedControl.cjs.map +1 -0
- package/dist/components/segmented-control/SegmentedControl.css +1 -0
- package/dist/components/segmented-control/SegmentedControl.d.ts +71 -0
- package/dist/components/segmented-control/SegmentedControl.d.ts.map +1 -0
- package/dist/components/segmented-control/SegmentedControl.js +173 -0
- package/dist/components/segmented-control/SegmentedControl.js.map +1 -0
- package/dist/components/segmented-control/SegmentedControl.module.scss.cjs +2 -0
- package/dist/components/segmented-control/SegmentedControl.module.scss.cjs.map +1 -0
- package/dist/components/segmented-control/SegmentedControl.module.scss.js +20 -0
- package/dist/components/segmented-control/SegmentedControl.module.scss.js.map +1 -0
- package/dist/components/segmented-control/index.cjs +2 -0
- package/dist/components/segmented-control/index.cjs.map +1 -0
- package/dist/components/segmented-control/index.d.ts +3 -0
- package/dist/components/segmented-control/index.d.ts.map +1 -0
- package/dist/components/segmented-control/index.js +5 -0
- package/dist/components/segmented-control/index.js.map +1 -0
- package/dist/components/select/Select.cjs +1 -1
- package/dist/components/select/Select.cjs.map +1 -1
- package/dist/components/select/Select.css +1 -1
- package/dist/components/select/Select.d.ts +14 -0
- package/dist/components/select/Select.d.ts.map +1 -1
- package/dist/components/select/Select.js +151 -130
- package/dist/components/select/Select.js.map +1 -1
- package/dist/components/select/Select.module.scss.cjs +1 -1
- package/dist/components/select/Select.module.scss.js +28 -26
- package/dist/components/select/Select.module.scss.js.map +1 -1
- package/dist/components/shortcut-tag/ShortcutTag.css +1 -1
- package/dist/components/shortcut-tag/ShortcutTag.module.scss.cjs +1 -1
- package/dist/components/shortcut-tag/ShortcutTag.module.scss.js +7 -7
- package/dist/components/spinner/Spinner.css +1 -1
- package/dist/components/spinner/Spinner.module.scss.cjs +1 -1
- package/dist/components/spinner/Spinner.module.scss.js +2 -2
- package/dist/components/status-badge/StatusBadge.cjs +1 -1
- package/dist/components/status-badge/StatusBadge.cjs.map +1 -1
- package/dist/components/status-badge/StatusBadge.css +1 -1
- package/dist/components/status-badge/StatusBadge.d.ts +3 -1
- package/dist/components/status-badge/StatusBadge.d.ts.map +1 -1
- package/dist/components/status-badge/StatusBadge.js +16 -15
- package/dist/components/status-badge/StatusBadge.js.map +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 +8 -8
- package/dist/components/tabs/Tabs.css +1 -1
- package/dist/components/tabs/Tabs.module.scss.cjs +1 -1
- package/dist/components/tabs/Tabs.module.scss.js +16 -13
- package/dist/components/tabs/Tabs.module.scss.js.map +1 -1
- package/dist/components/tag/Tag.css +1 -1
- package/dist/components/tag/Tag.module.scss.cjs +1 -1
- package/dist/components/tag/Tag.module.scss.js +11 -11
- package/dist/components/team-avatar/TeamAvatar.css +1 -1
- package/dist/components/team-avatar/TeamAvatar.module.scss.cjs +1 -1
- package/dist/components/team-avatar/TeamAvatar.module.scss.js +17 -17
- package/dist/components/text-area/TextArea.css +1 -1
- package/dist/components/text-area/TextArea.module.scss.cjs +1 -1
- package/dist/components/text-area/TextArea.module.scss.js +12 -12
- package/dist/components/text-input/TextInput.css +1 -1
- package/dist/components/text-input/TextInput.module.scss.cjs +1 -1
- package/dist/components/text-input/TextInput.module.scss.js +19 -19
- 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.map +1 -1
- package/dist/components/thread-footer/ThreadFooter.js +14 -14
- 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 +19 -20
- package/dist/components/thread-footer/ThreadFooter.module.scss.js.map +1 -1
- package/dist/components/thread-list-item/ThreadListItem.css +1 -1
- package/dist/components/thread-list-item/ThreadListItem.module.scss.cjs +1 -1
- package/dist/components/thread-list-item/ThreadListItem.module.scss.js +26 -26
- package/dist/components/tile-button/TileButton.css +1 -1
- package/dist/components/tile-button/TileButton.module.scss.cjs +1 -1
- package/dist/components/tile-button/TileButton.module.scss.js +6 -6
- package/dist/components/toast/Toast.css +1 -1
- package/dist/components/toast/Toast.module.scss.cjs +1 -1
- package/dist/components/toast/Toast.module.scss.js +11 -11
- package/dist/components/tooltip/Tooltip.cjs +1 -1
- package/dist/components/tooltip/Tooltip.cjs.map +1 -1
- package/dist/components/tooltip/Tooltip.css +1 -1
- package/dist/components/tooltip/Tooltip.d.ts +10 -1
- package/dist/components/tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/tooltip/Tooltip.js +29 -17
- package/dist/components/tooltip/Tooltip.js.map +1 -1
- package/dist/components/tooltip/Tooltip.module.scss.cjs +1 -1
- package/dist/components/tooltip/Tooltip.module.scss.js +7 -6
- package/dist/components/tooltip/Tooltip.module.scss.js.map +1 -1
- package/dist/components/tooltip/index.d.ts +1 -1
- package/dist/components/tooltip/index.d.ts.map +1 -1
- package/dist/components/tour-point/TourPoint.css +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.cjs +1 -1
- package/dist/components/user-avatar/UserAvatar.cjs.map +1 -1
- package/dist/components/user-avatar/UserAvatar.css +1 -1
- package/dist/components/user-avatar/UserAvatar.d.ts +18 -8
- package/dist/components/user-avatar/UserAvatar.d.ts.map +1 -1
- package/dist/components/user-avatar/UserAvatar.js +84 -52
- package/dist/components/user-avatar/UserAvatar.js.map +1 -1
- package/dist/components/user-avatar/UserAvatar.module.scss.cjs +1 -1
- package/dist/components/user-avatar/UserAvatar.module.scss.js +33 -26
- package/dist/components/user-avatar/UserAvatar.module.scss.js.map +1 -1
- package/dist/components/user-avatar-group/UserAvatarGroup.css +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.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +57 -55
- package/dist/index.js.map +1 -1
- package/package.json +4 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChannelSidebarItem.cjs","sources":["../../../src/components/channel-sidebar-item/ChannelSidebarItem.tsx"],"sourcesContent":["import type { MouseEvent, ReactNode } from 'react';\nimport GlobeIcon from '@mattermost/compass-icons/components/globe';\nimport LockOutlineIcon from '@mattermost/compass-icons/components/lock-outline';\nimport MessageTextOutlineIcon from '@mattermost/compass-icons/components/message-text-outline';\nimport SendOutlineIcon from '@mattermost/compass-icons/components/send-outline';\nimport ChartLineIcon from '@mattermost/compass-icons/components/chart-line';\nimport CircleMultipleOutlineIcon from '@mattermost/compass-icons/components/circle-multiple-outline';\nimport PhoneInTalkIcon from '@mattermost/compass-icons/components/phone-in-talk';\nimport DotsVerticalIcon from '@mattermost/compass-icons/components/dots-vertical';\nimport DialpadIcon from '@mattermost/compass-icons/components/dialpad';\nimport UserAvatar from '@/components/user-avatar/UserAvatar';\nimport MentionBadge from '@/components/mention-badge/MentionBadge';\nimport Icon from '@/components/icon/Icon';\nimport IconButton from '@/components/icon-button/IconButton';\nimport styles from './ChannelSidebarItem.module.scss';\n\nexport type ChannelSidebarItemLeadingVisual =\n | 'public'\n | 'private'\n | 'group-message'\n | 'direct-message'\n | 'drafts'\n | 'insights'\n | 'threads'\n | 'dial-pad';\n\nexport type ChannelSidebarItemStatus = 'read' | 'unread' | 'mention';\n\nexport interface ChannelSidebarItemProps {\n className?: string;\n /** Channel or user display name. Accepts translated nodes. */\n name: ReactNode;\n /**\n * Text-only row (e.g. System Console navigation): no channel glyph or\n * overflow menu; name aligns with channel sidebar label padding.\n */\n hideLeadingVisual?: boolean;\n /** Leading visual type. Default: Public. Ignored when `hideLeadingVisual`. */\n leadingVisual?: ChannelSidebarItemLeadingVisual;\n /** Read/unread/mention state. Default: Read. */\n status?: ChannelSidebarItemStatus;\n /** Highlighted as the currently active item. */\n active?: boolean;\n /** Muted channel — reduces visual prominence. */\n muted?: boolean;\n /** Shows a call-in-progress indicator on the right. */\n callActive?: boolean;\n /** Shows the shared-channel icon after the name. */\n sharedChannel?: boolean;\n /** Mention count shown in the badge when status='mention'. */\n mentionCount?: number;\n /** Member count shown in the group icon when leadingVisual='group-message'. */\n memberCount?: number;\n /** Avatar image URL for leadingVisual='direct-message'. */\n avatarSrc?: string;\n /** Avatar alt text for leadingVisual='direct-message'. */\n avatarAlt?: string;\n /** Shows status badge on the avatar when leadingVisual='direct-message'. */\n showAvatarStatus?: boolean;\n /** Custom status emoji shown after the name for leadingVisual='direct-message'. */\n customStatusEmoji?: string;\n onClick?: () => void;\n /** Overflow menu (kebab). Sibling of the channel control so it is keyboard-reachable. */\n onMenuClick?: (event: MouseEvent<HTMLButtonElement>) => void;\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: \"Channel options\". */\n menuLabel?: string;\n}\n\nconst defaultFormatMentions = (count: number) =>\n `${count} mention${count === 1 ? '' : 's'}`;\n\nfunction LeadingVisualContent({\n leadingVisual,\n memberCount,\n avatarSrc,\n showAvatarStatus,\n}: {\n leadingVisual: ChannelSidebarItemLeadingVisual;\n memberCount: number | undefined;\n avatarSrc: string | undefined;\n showAvatarStatus: boolean | undefined;\n}) {\n switch (leadingVisual) {\n case 'private':\n return <LockOutlineIcon size={16} />;\n case 'group-message':\n return (\n <div className={styles['channel-sidebar-item__group-icon']}>\n {memberCount ?? 2}\n </div>\n );\n case 'direct-message':\n return (\n <UserAvatar\n src={avatarSrc ?? ''}\n alt=\"\"\n size=\"20\"\n status={!!showAvatarStatus}\n />\n );\n case 'drafts':\n return <SendOutlineIcon size={16} />;\n case 'insights':\n return <ChartLineIcon size={16} />;\n case 'threads':\n return <MessageTextOutlineIcon size={16} />;\n case 'dial-pad':\n return <DialpadIcon size={16} />;\n case 'public':\n default:\n return <GlobeIcon size={16} />;\n }\n}\n\n/**\n * The Channel Sidebar Item is the row people use to move between channels, DMs, and group\n * messages. It compresses a lot of state — channel type, unread, mention count, mute,\n * in-call — into a single, scannable line.\n */\nexport default function ChannelSidebarItem({\n className,\n name,\n hideLeadingVisual = false,\n leadingVisual = 'public',\n status = 'read',\n active = false,\n muted = false,\n callActive = false,\n sharedChannel = false,\n mentionCount,\n memberCount,\n avatarSrc,\n showAvatarStatus = false,\n customStatusEmoji,\n onClick,\n onMenuClick,\n formatMentionLabel = defaultFormatMentions,\n unreadLabel = 'unread',\n menuLabel = 'Channel options',\n}: ChannelSidebarItemProps) {\n const isDM = !hideLeadingVisual && leadingVisual === 'direct-message';\n const isDrafts = !hideLeadingVisual && leadingVisual === 'drafts';\n const effectiveStatus = isDrafts && status === 'unread' ? 'read' : status;\n const hasMentionBadge = effectiveStatus === 'mention';\n const isChannelOrDM =\n !hideLeadingVisual &&\n ['public', 'private', 'group-message', 'direct-message'].includes(\n leadingVisual,\n );\n\n const rootClass = [\n styles['channel-sidebar-item'],\n hideLeadingVisual ? styles['channel-sidebar-item--text-only'] : '',\n active ? styles['channel-sidebar-item--active'] : '',\n muted ? styles['channel-sidebar-item--muted'] : '',\n styles[`channel-sidebar-item--status-${effectiveStatus.toLowerCase()}`],\n isDrafts ? styles['channel-sidebar-item--drafts'] : '',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n const iconContainerClass = [\n styles['channel-sidebar-item__icon-container'],\n isDM ? styles['channel-sidebar-item__icon-container--dm'] : '',\n ]\n .filter(Boolean)\n .join(' ');\n\n const rightClass = styles['channel-sidebar-item__right'];\n\n const statusHint =\n effectiveStatus === 'mention'\n ? formatMentionLabel(mentionCount ?? 1)\n : effectiveStatus === 'unread'\n ? unreadLabel\n : undefined;\n\n return (\n <div className={rootClass}>\n {active && (\n <div className={styles['channel-sidebar-item__active-border']} />\n )}\n <button\n type=\"button\"\n className={styles['channel-sidebar-item__left']}\n onClick={onClick}\n aria-current={active ? true : undefined}\n >\n {!hideLeadingVisual && (\n <div className={iconContainerClass} aria-hidden>\n <LeadingVisualContent\n leadingVisual={leadingVisual}\n memberCount={memberCount}\n avatarSrc={avatarSrc}\n showAvatarStatus={showAvatarStatus}\n />\n </div>\n )}\n <div className={styles['channel-sidebar-item__content']}>\n <span className={styles['channel-sidebar-item__name']}>{name}</span>\n {statusHint && (\n <span className={styles['channel-sidebar-item__status-hint']}>\n {statusHint}\n </span>\n )}\n {sharedChannel && (\n <span\n className={styles['channel-sidebar-item__shared-icon']}\n aria-hidden\n >\n <CircleMultipleOutlineIcon size={12} />\n </span>\n )}\n {isDM && customStatusEmoji && (\n <span\n className={styles['channel-sidebar-item__custom-status']}\n aria-hidden\n >\n {customStatusEmoji}\n </span>\n )}\n </div>\n </button>\n <div className={rightClass}>\n {callActive && (\n <div className={styles['channel-sidebar-item__call']} aria-hidden>\n <PhoneInTalkIcon size={12} />\n </div>\n )}\n {hasMentionBadge && (\n <span\n className={styles['channel-sidebar-item__mention-badge']}\n aria-hidden\n >\n <MentionBadge\n count={mentionCount ?? 1}\n location=\"sidebar\"\n size=\"medium\"\n />\n </span>\n )}\n {isChannelOrDM && (\n <span className={styles['channel-sidebar-item__menu-button']}>\n <IconButton\n className={styles['channel-sidebar-item__menu-icon']}\n size=\"x-small\"\n style=\"inverted\"\n icon={<Icon glyph={<DotsVerticalIcon />} />}\n aria-label={menuLabel}\n onClick={(e) => {\n e.stopPropagation();\n onMenuClick?.(e);\n }}\n />\n </span>\n )}\n </div>\n </div>\n );\n}\n"],"names":["defaultFormatMentions","count","LeadingVisualContent","leadingVisual","memberCount","avatarSrc","showAvatarStatus","jsx","LockOutlineIcon","styles","UserAvatar","SendOutlineIcon","ChartLineIcon","MessageTextOutlineIcon","DialpadIcon","GlobeIcon","ChannelSidebarItem","className","name","hideLeadingVisual","status","active","muted","callActive","sharedChannel","mentionCount","customStatusEmoji","onClick","onMenuClick","formatMentionLabel","unreadLabel","menuLabel","isDM","isDrafts","effectiveStatus","hasMentionBadge","isChannelOrDM","rootClass","iconContainerClass","rightClass","statusHint","jsxs","CircleMultipleOutlineIcon","PhoneInTalkIcon","MentionBadge","IconButton","Icon","DotsVerticalIcon","e"],"mappings":"i6BAwEMA,EAAyBC,GAC7B,GAAGA,CAAK,WAAWA,IAAU,EAAI,GAAK,GAAG,GAE3C,SAASC,EAAqB,CAC5B,cAAAC,EACA,YAAAC,EACA,UAAAC,EACA,iBAAAC,CACF,EAKG,CACD,OAAQH,EAAA,CACN,IAAK,UACH,OAAOI,EAAAA,IAACC,EAAA,CAAgB,KAAM,EAAA,CAAI,EACpC,IAAK,gBACH,aACG,MAAA,CAAI,UAAWC,EAAAA,QAAO,kCAAkC,EACtD,YAAe,EAClB,EAEJ,IAAK,iBACH,OACEF,EAAAA,IAACG,EAAAA,QAAA,CACC,IAAKL,GAAa,GAClB,IAAI,GACJ,KAAK,KACL,OAAQ,CAAC,CAACC,CAAA,CAAA,EAGhB,IAAK,SACH,OAAOC,EAAAA,IAACI,EAAA,CAAgB,KAAM,EAAA,CAAI,EACpC,IAAK,WACH,OAAOJ,EAAAA,IAACK,EAAA,CAAc,KAAM,EAAA,CAAI,EAClC,IAAK,UACH,OAAOL,EAAAA,IAACM,EAAA,CAAuB,KAAM,EAAA,CAAI,EAC3C,IAAK,WACH,OAAON,EAAAA,IAACO,EAAA,CAAY,KAAM,EAAA,CAAI,EAChC,IAAK,SACL,QACE,OAAOP,EAAAA,IAACQ,EAAA,CAAU,KAAM,EAAA,CAAI,CAAA,CAElC,CAOA,SAAwBC,EAAmB,CACzC,UAAAC,EACA,KAAAC,EACA,kBAAAC,EAAoB,GACpB,cAAAhB,EAAgB,SAChB,OAAAiB,EAAS,OACT,OAAAC,EAAS,GACT,MAAAC,EAAQ,GACR,WAAAC,EAAa,GACb,cAAAC,EAAgB,GAChB,aAAAC,EACA,YAAArB,EACA,UAAAC,EACA,iBAAAC,EAAmB,GACnB,kBAAAoB,EACA,QAAAC,EACA,YAAAC,EACA,mBAAAC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,aAAYhB,EACZ,QAAUiB,GAAM,CACdA,EAAE,gBAAA,EACFpB,GAAA,MAAAA,EAAcoB,EAChB,CAAA,CAAA,CACF,CACF,CAAA,CAAA,CAEJ,CAAA,EACF,CAEJ"}
|
|
1
|
+
{"version":3,"file":"ChannelSidebarItem.cjs","sources":["../../../src/components/channel-sidebar-item/ChannelSidebarItem.tsx"],"sourcesContent":["import type { MouseEvent, ReactNode } from 'react';\nimport GlobeIcon from '@mattermost/compass-icons/components/globe';\nimport LockOutlineIcon from '@mattermost/compass-icons/components/lock-outline';\nimport MessageTextOutlineIcon from '@mattermost/compass-icons/components/message-text-outline';\nimport SendOutlineIcon from '@mattermost/compass-icons/components/send-outline';\nimport ChartLineIcon from '@mattermost/compass-icons/components/chart-line';\nimport CircleMultipleOutlineIcon from '@mattermost/compass-icons/components/circle-multiple-outline';\nimport PhoneInTalkIcon from '@mattermost/compass-icons/components/phone-in-talk';\nimport DotsVerticalIcon from '@mattermost/compass-icons/components/dots-vertical';\nimport DialpadIcon from '@mattermost/compass-icons/components/dialpad';\nimport ChevronDownIcon from '@mattermost/compass-icons/components/chevron-down';\nimport ChevronRightIcon from '@mattermost/compass-icons/components/chevron-right';\nimport UserAvatar from '@/components/user-avatar/UserAvatar';\nimport MentionBadge from '@/components/mention-badge/MentionBadge';\nimport Icon, { IconSlotContext } from '@/components/icon/Icon';\nimport IconButton from '@/components/icon-button/IconButton';\nimport { mergeClassNames, type BuiltInButtonProps } from '@/utils/props';\nimport styles from './ChannelSidebarItem.module.scss';\n\nexport type ChannelSidebarItemLeadingVisual =\n | 'public'\n | 'private'\n | 'group-message'\n | 'direct-message'\n | 'drafts'\n | 'insights'\n | 'threads'\n | 'dial-pad';\n\nexport type ChannelSidebarItemStatus = 'read' | 'unread' | 'mention';\n\nexport interface ChannelSidebarItemProps {\n className?: string;\n /** Channel or user display name. Accepts translated nodes. */\n name: ReactNode;\n /**\n * Text-only row (e.g. System Console navigation): no channel glyph or\n * overflow menu; name aligns with channel sidebar label padding.\n */\n hideLeadingVisual?: boolean;\n /**\n * Leading visual. A built-in type string (`'public'`, `'private'`, …) keeps its\n * glyph; any other node (not a string) replaces the icon, like `MenuItem`. Custom\n * nodes render in the same 24px icon column, so the label stays aligned. For an\n * icon use `<Icon glyph={<SomeIcon />} />` — the size (16) comes from context.\n * A 16–24px element such as a 20px avatar is centered in the column.\n * Default: Public. Ignored when `hideLeadingVisual`.\n */\n leadingVisual?: ChannelSidebarItemLeadingVisual | ReactNode;\n /**\n * Custom content for the trailing slot, after the name and before the mention\n * badge / menu button (e.g. a responding indicator). Status-only: on rows with\n * the overflow menu it fades out on hover / focus, like the mention badge, so\n * don't put interactive content in it. `status` styling is independent of it.\n * When omitted, nothing is rendered.\n */\n trailingVisual?: ReactNode;\n /** Read/unread/mention state. Default: Read. */\n status?: ChannelSidebarItemStatus;\n /** Highlighted as the currently active item. */\n active?: boolean;\n /** Muted channel — reduces visual prominence. */\n muted?: boolean;\n /** Shows a call-in-progress indicator on the right. */\n callActive?: boolean;\n /** Shows the shared-channel icon after the name. */\n sharedChannel?: boolean;\n /** Mention count shown in the badge when status='mention'. */\n mentionCount?: number;\n /** Member count shown in the group icon when leadingVisual='group-message'. */\n memberCount?: number;\n /** Avatar image URL for leadingVisual='direct-message' (not used with a custom node). */\n avatarSrc?: string;\n /** Avatar alt text for leadingVisual='direct-message'. */\n avatarAlt?: string;\n /** Shows status badge on the avatar when leadingVisual='direct-message' (not used with a custom node). */\n showAvatarStatus?: boolean;\n /** Custom status emoji after the name for a direct message or a custom leading visual. A node can carry a tooltip trigger. */\n customStatusEmoji?: ReactNode;\n /**\n * Visually hidden description of the custom status (for example \"🌴 Out of\n * office\"), read with the row name. The emoji itself stays `aria-hidden`, so\n * pass this whenever `customStatusEmoji` carries meaning. Accepts translated\n * nodes.\n */\n customStatusLabel?: ReactNode;\n onClick?: () => void;\n /** Overflow menu (kebab). Sibling of the channel control so it is keyboard-reachable. */\n onMenuClick?: (event: MouseEvent<HTMLButtonElement>) => void;\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: \"Channel options\". */\n menuLabel?: string;\n /**\n * Interactive controls (e.g. an `IconButton`) shown at the right edge, in the\n * overflow menu's place: it replaces the built-in menu. Unlike\n * `trailingVisual`, actions stay clickable. See `actionsReveal`.\n */\n actions?: ReactNode;\n /**\n * When `actions` show. `hover` (default): hidden until the row is hovered or\n * has focus, like the built-in menu (the mention badge and `trailingVisual`\n * give way). `always`: visible, slightly dimmed, at rest and at full\n * strength on hover / focus; the badge and `trailingVisual` stay visible\n * beside it.\n */\n actionsReveal?: 'hover' | 'always';\n /** Keeps `actions` revealed, e.g. while a menu opened from them is open. */\n actionsOpen?: boolean;\n /** Hides the built-in overflow menu without adding `actions`. */\n hideMenu?: boolean;\n /**\n * Turns the row into the parent of a collapsible group: shows a chevron\n * toggle in the left gutter (revealed on hover / focus) and sets\n * `aria-expanded` on it. The row itself stays a navigation control; the\n * group's list and animation are up to the host. Omit for a normal row.\n */\n expanded?: boolean;\n /** Called with the next state when the chevron toggle is activated. */\n onExpandedChange?: (expanded: boolean) => void;\n /** `id` of the list the toggle controls (`aria-controls`). */\n controlsId?: string;\n /**\n * Accessible name of the toggle. It stays the same in both states;\n * `aria-expanded` carries the state. Default: \"Toggle\".\n */\n toggleLabel?: string;\n /** Extra attributes for the chevron toggle button. */\n toggleButtonProps?: BuiltInButtonProps;\n}\n\nconst defaultFormatMentions = (count: number) =>\n `${count} mention${count === 1 ? '' : 's'}`;\n\nfunction isBuiltInLeadingVisual(\n value: unknown,\n): value is ChannelSidebarItemLeadingVisual | undefined {\n // Strings (and omitted) keep today's built-in behavior, including the\n // fallback to the public glyph for unknown strings.\n return value === undefined || typeof value === 'string';\n}\n\nfunction LeadingVisualContent({\n leadingVisual,\n memberCount,\n avatarSrc,\n showAvatarStatus,\n}: {\n leadingVisual: ChannelSidebarItemLeadingVisual | undefined;\n memberCount: number | undefined;\n avatarSrc: string | undefined;\n showAvatarStatus: boolean | undefined;\n}) {\n switch (leadingVisual) {\n case 'private':\n return <LockOutlineIcon size={16} />;\n case 'group-message':\n return (\n <div className={styles['channel-sidebar-item__group-icon']}>\n {memberCount ?? 2}\n </div>\n );\n case 'direct-message':\n return (\n <UserAvatar\n src={avatarSrc ?? ''}\n alt=\"\"\n size=\"20\"\n status={!!showAvatarStatus}\n />\n );\n case 'drafts':\n return <SendOutlineIcon size={16} />;\n case 'insights':\n return <ChartLineIcon size={16} />;\n case 'threads':\n return <MessageTextOutlineIcon size={16} />;\n case 'dial-pad':\n return <DialpadIcon size={16} />;\n case 'public':\n default:\n return <GlobeIcon size={16} />;\n }\n}\n\n/**\n * The Channel Sidebar Item is the row people use to move between channels, DMs, and group\n * messages. It compresses a lot of state — channel type, unread, mention count, mute,\n * in-call — into a single, scannable line.\n */\nexport default function ChannelSidebarItem({\n className,\n name,\n hideLeadingVisual = false,\n leadingVisual,\n trailingVisual,\n status = 'read',\n active = false,\n muted = false,\n callActive = false,\n sharedChannel = false,\n mentionCount,\n memberCount,\n avatarSrc,\n showAvatarStatus = false,\n customStatusEmoji,\n customStatusLabel,\n onClick,\n onMenuClick,\n formatMentionLabel = defaultFormatMentions,\n unreadLabel = 'unread',\n menuLabel = 'Channel options',\n actions,\n actionsReveal = 'hover',\n actionsOpen = false,\n hideMenu = false,\n expanded,\n onExpandedChange,\n controlsId,\n toggleLabel = 'Toggle',\n toggleButtonProps,\n}: ChannelSidebarItemProps) {\n const isCustomVisual =\n !hideLeadingVisual &&\n leadingVisual !== null &&\n !isBuiltInLeadingVisual(leadingVisual);\n const builtInVisual: ChannelSidebarItemLeadingVisual = isBuiltInLeadingVisual(\n leadingVisual,\n )\n ? (leadingVisual ?? 'public')\n : 'public';\n const isDM =\n !hideLeadingVisual && builtInVisual === 'direct-message' && !isCustomVisual;\n const isDrafts =\n !hideLeadingVisual && builtInVisual === 'drafts' && !isCustomVisual;\n const effectiveStatus = isDrafts && status === 'unread' ? 'read' : status;\n const hasMentionBadge = effectiveStatus === 'mention';\n const isChannelOrDM =\n !hideLeadingVisual &&\n (isCustomVisual ||\n ['public', 'private', 'group-message', 'direct-message'].includes(\n builtInVisual,\n ));\n\n const hasActions = actions != null && actions !== false;\n const actionsAlways = hasActions && actionsReveal === 'always';\n const showMenu = isChannelOrDM && !hideMenu && !hasActions;\n // Trailing content gives way on hover only when something takes its place.\n const revealsOnHover = showMenu || (hasActions && !actionsAlways);\n const hasToggle = expanded !== undefined;\n\n const rootClass = [\n styles['channel-sidebar-item'],\n hideLeadingVisual ? styles['channel-sidebar-item--text-only'] : '',\n active ? styles['channel-sidebar-item--active'] : '',\n muted ? styles['channel-sidebar-item--muted'] : '',\n styles[`channel-sidebar-item--status-${effectiveStatus.toLowerCase()}`],\n isDrafts ? styles['channel-sidebar-item--drafts'] : '',\n actionsAlways ? styles['channel-sidebar-item--actions-always'] : '',\n !revealsOnHover ? styles['channel-sidebar-item--no-hover-menu'] : '',\n hasActions && actionsOpen && !actionsAlways\n ? styles['channel-sidebar-item--actions-open']\n : '',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n const iconContainerClass = [\n styles['channel-sidebar-item__icon-container'],\n isDM ? styles['channel-sidebar-item__icon-container--dm'] : '',\n isCustomVisual\n ? styles['channel-sidebar-item__icon-container--custom']\n : '',\n ]\n .filter(Boolean)\n .join(' ');\n\n const rightClass = styles['channel-sidebar-item__right'];\n\n const statusHint =\n effectiveStatus === 'mention'\n ? formatMentionLabel(mentionCount ?? 1)\n : effectiveStatus === 'unread'\n ? unreadLabel\n : undefined;\n\n return (\n <div className={rootClass}>\n {active && (\n <div className={styles['channel-sidebar-item__active-border']} />\n )}\n <button\n type=\"button\"\n className={styles['channel-sidebar-item__left']}\n onClick={onClick}\n aria-current={active ? true : undefined}\n >\n {!hideLeadingVisual && (\n <div className={iconContainerClass} aria-hidden>\n {isCustomVisual ? (\n <IconSlotContext.Provider value={{ size: '16' }}>\n {leadingVisual as ReactNode}\n </IconSlotContext.Provider>\n ) : (\n <LeadingVisualContent\n leadingVisual={builtInVisual}\n memberCount={memberCount}\n avatarSrc={avatarSrc}\n showAvatarStatus={showAvatarStatus}\n />\n )}\n </div>\n )}\n <div className={styles['channel-sidebar-item__content']}>\n <span className={styles['channel-sidebar-item__name']}>{name}</span>\n {statusHint && (\n <span className={styles['channel-sidebar-item__status-hint']}>\n {statusHint}\n </span>\n )}\n {sharedChannel && (\n <span\n className={styles['channel-sidebar-item__shared-icon']}\n aria-hidden\n >\n <Icon glyph={<CircleMultipleOutlineIcon />} size=\"12\" />\n </span>\n )}\n {(isDM || isCustomVisual) && customStatusLabel && (\n <span className={styles['channel-sidebar-item__status-hint']}>\n {customStatusLabel}\n </span>\n )}\n {(isDM || isCustomVisual) && customStatusEmoji && (\n <span\n className={styles['channel-sidebar-item__custom-status']}\n aria-hidden\n >\n {customStatusEmoji}\n </span>\n )}\n </div>\n </button>\n {hasToggle && (\n <button\n type=\"button\"\n {...toggleButtonProps}\n {...(controlsId ? { 'aria-controls': controlsId } : {})}\n className={mergeClassNames(\n styles['channel-sidebar-item__toggle'],\n toggleButtonProps?.className,\n )}\n aria-expanded={expanded}\n aria-label={toggleLabel}\n onClick={(e) => {\n toggleButtonProps?.onClick?.(e);\n onExpandedChange?.(!expanded);\n }}\n >\n <Icon\n glyph={expanded ? <ChevronDownIcon /> : <ChevronRightIcon />}\n size=\"12\"\n />\n </button>\n )}\n <div className={rightClass}>\n {trailingVisual != null && trailingVisual !== false && (\n <span\n className={[\n styles['channel-sidebar-item__trailing-visual'],\n revealsOnHover\n ? styles['channel-sidebar-item__trailing-visual--with-menu']\n : '',\n ]\n .filter(Boolean)\n .join(' ')}\n >\n <IconSlotContext.Provider value={{ size: '16' }}>\n {trailingVisual}\n </IconSlotContext.Provider>\n </span>\n )}\n {callActive && (\n <div className={styles['channel-sidebar-item__call']} aria-hidden>\n <PhoneInTalkIcon size={12} />\n </div>\n )}\n {hasMentionBadge && (\n <span\n className={styles['channel-sidebar-item__mention-badge']}\n aria-hidden\n >\n <MentionBadge\n count={mentionCount ?? 1}\n location=\"sidebar\"\n size=\"medium\"\n />\n </span>\n )}\n {hasActions && (\n <span\n className={mergeClassNames(\n styles['channel-sidebar-item__actions'],\n actionsAlways && styles['channel-sidebar-item__actions--always'],\n actionsOpen && styles['channel-sidebar-item__actions--open'],\n )}\n >\n {actions}\n </span>\n )}\n {showMenu && (\n <span className={styles['channel-sidebar-item__menu-button']}>\n <IconButton\n className={styles['channel-sidebar-item__menu-icon']}\n size=\"x-small\"\n style=\"inverted\"\n icon={<Icon glyph={<DotsVerticalIcon />} />}\n aria-label={menuLabel}\n onClick={(e) => {\n e.stopPropagation();\n onMenuClick?.(e);\n }}\n />\n </span>\n )}\n </div>\n </div>\n );\n}\n"],"names":["defaultFormatMentions","count","isBuiltInLeadingVisual","value","LeadingVisualContent","leadingVisual","memberCount","avatarSrc","showAvatarStatus","jsx","LockOutlineIcon","styles","UserAvatar","SendOutlineIcon","ChartLineIcon","MessageTextOutlineIcon","DialpadIcon","GlobeIcon","ChannelSidebarItem","className","name","hideLeadingVisual","trailingVisual","status","active","muted","callActive","sharedChannel","mentionCount","customStatusEmoji","customStatusLabel","onClick","onMenuClick","formatMentionLabel","unreadLabel","menuLabel","actions","actionsReveal","actionsOpen","hideMenu","expanded","onExpandedChange","controlsId","toggleLabel","toggleButtonProps","isCustomVisual","builtInVisual","isDM","isDrafts","effectiveStatus","hasMentionBadge","isChannelOrDM","hasActions","actionsAlways","showMenu","revealsOnHover","hasToggle","rootClass","iconContainerClass","rightClass","statusHint","jsxs","IconSlotContext","Icon","CircleMultipleOutlineIcon","mergeClassNames","e","_a","ChevronDownIcon","ChevronRightIcon","PhoneInTalkIcon","MentionBadge","IconButton","DotsVerticalIcon"],"mappings":"glCAqIMA,GAAyBC,GAC7B,GAAGA,CAAK,WAAWA,IAAU,E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AAW,GAEX,SAAAF,EAAAA,IAAC8D,GAAAA,QAAA,CACC,MAAO3C,GAAgB,EACvB,SAAS,UACT,KAAK,QAAA,CAAA,CACP,CAAA,EAGHwB,GACC3C,EAAAA,IAAC,OAAA,CACC,UAAWwD,EAAAA,gBACTtD,EAAAA,QAAO,+BAA+B,EACtC0C,GAAiB1C,EAAAA,QAAO,uCAAuC,EAC/D2B,GAAe3B,EAAAA,QAAO,qCAAqC,CAAA,EAG5D,SAAAyB,CAAA,CAAA,EAGJkB,GACC7C,EAAAA,IAAC,OAAA,CAAK,UAAWE,EAAAA,QAAO,mCAAmC,EACzD,SAAAF,EAAAA,IAAC+D,GAAAA,QAAA,CACC,UAAW7D,EAAAA,QAAO,iCAAiC,EACnD,KAAK,UACL,MAAM,WACN,KAAMF,EAAAA,IAACsD,EAAAA,QAAA,CAAK,MAAOtD,EAAAA,IAACgE,KAAiB,EAAI,EACzC,aAAYtC,EACZ,QAAU+B,GAAM,CACdA,EAAE,gBAAA,EACFlC,GAAA,MAAAA,EAAckC,EAChB,CAAA,CAAA,CACF,CACF,CAAA,CAAA,CAEJ,CAAA,EACF,CAEJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._channel-sidebar-
|
|
1
|
+
._channel-sidebar-item_1w0n4_13{position:relative;display:flex;align-items:center;height:32px;overflow:hidden;-webkit-user-select:none;user-select:none}._channel-sidebar-item__menu-button_1w0n4_21,._channel-sidebar-item__actions_1w0n4_21{position:absolute;top:50%;right:var(--spacing-l);display:flex;transform:translateY(-50%);opacity:0;pointer-events:none;transition:opacity var(--duration-quick) var(--ease-transition)}._channel-sidebar-item__mention-badge_1w0n4_31{display:flex;align-items:center;justify-content:center;min-width:var(--icon-size-24);transition:opacity var(--duration-quick) var(--ease-transition)}._channel-sidebar-item__actions_1w0n4_21{align-items:center}._channel-sidebar-item__actions--always_1w0n4_41{opacity:var(--opacity-72);pointer-events:auto}._channel-sidebar-item__actions--open_1w0n4_45{opacity:1;pointer-events:auto}._channel-sidebar-item__toggle_1w0n4_49{outline:none}._channel-sidebar-item__toggle_1w0n4_49:focus-visible{outline:2px solid var(--focus-ring-color);outline-offset:3px;animation:_focus-ring-in_1w0n4_1 var(--duration-quick) var(--ease-transition)}@media(prefers-reduced-motion:reduce){._channel-sidebar-item__toggle_1w0n4_49:focus-visible{animation:none}}._channel-sidebar-item__toggle_1w0n4_49:not(._-host-shadow-a_1w0n4_62):not(._-host-shadow-b_1w0n4_62){box-shadow:none;border-radius:var(--radius-s)}@keyframes _focus-ring-in_1w0n4_1{0%{outline-color:transparent;outline-offset:0}}._channel-sidebar-item__toggle_1w0n4_49{position:absolute;top:50%;left:0;z-index:2;display:flex;align-items:center;justify-content:center;width:var(--icon-size-24);height:var(--icon-size-24);margin:0;padding:0;border:0;background:transparent;color:var(--sidebar-text);cursor:pointer;transform:translateY(-50%);opacity:0;pointer-events:none;transition:opacity var(--duration-quick) var(--ease-transition)}._channel-sidebar-item_1w0n4_13 ._channel-sidebar-item__menu-icon_1w0n4_93{--focus-ring-color: var(--sidebar-text-active-border)}._channel-sidebar-item_1w0n4_13:hover,._channel-sidebar-item_1w0n4_13:focus-within{overflow:visible}._channel-sidebar-item_1w0n4_13:hover ._channel-sidebar-item__menu-button_1w0n4_21,._channel-sidebar-item_1w0n4_13:focus-within ._channel-sidebar-item__menu-button_1w0n4_21{opacity:1;pointer-events:auto}._channel-sidebar-item_1w0n4_13:hover ._channel-sidebar-item__mention-badge_1w0n4_31,._channel-sidebar-item_1w0n4_13:focus-within ._channel-sidebar-item__mention-badge_1w0n4_31{opacity:0;pointer-events:none}._channel-sidebar-item_1w0n4_13:hover ._channel-sidebar-item__actions_1w0n4_21,._channel-sidebar-item_1w0n4_13:focus-within ._channel-sidebar-item__actions_1w0n4_21{opacity:1;pointer-events:auto}._channel-sidebar-item_1w0n4_13:hover ._channel-sidebar-item__toggle_1w0n4_49,._channel-sidebar-item_1w0n4_13:focus-within ._channel-sidebar-item__toggle_1w0n4_49{opacity:var(--opacity-72);pointer-events:auto}._channel-sidebar-item_1w0n4_13:hover:not(._channel-sidebar-item--active_1w0n4_115),._channel-sidebar-item_1w0n4_13:focus-within:not(._channel-sidebar-item--active_1w0n4_115){background:rgba(var(--sidebar-text-rgb),.08)}._channel-sidebar-item__active-border_1w0n4_118{flex-shrink:0;width:2px;align-self:stretch;border-radius:0 var(--radius-xs) var(--radius-xs) 0;background:var(--sidebar-text-active-border)}._channel-sidebar-item__left_1w0n4_125{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0;border:none;background:transparent;display:flex;align-items:center;flex:1;min-width:0;align-self:stretch;gap:var(--spacing-xxxxs);padding:var(--spacing-xxxxs) var(--spacing-xs) var(--spacing-xxxxs) 18px;cursor:pointer;font:inherit;color:inherit;text-align:left}._channel-sidebar-item__left_1w0n4_125:focus{outline:none}._channel-sidebar-item__left_1w0n4_125:focus-visible{box-shadow:inset 0 0 0 2px var(--sidebar-text-active-border)}._channel-sidebar-item__icon-container_1w0n4_148{display:flex;align-items:center;flex-shrink:0;padding:var(--spacing-xxxs);color:var(--sidebar-text);opacity:.64}._channel-sidebar-item__icon-container--dm_1w0n4_156{padding:var(--spacing-xxxxs);opacity:1;--status-badge-bg: var(--sidebar-bg)}._channel-sidebar-item__icon-container--custom_1w0n4_161{justify-content:center;width:var(--icon-size-24);height:var(--icon-size-24);padding:0;box-sizing:border-box;opacity:.72}._channel-sidebar-item__trailing-visual_1w0n4_169{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--icon-size-24);transition:opacity var(--duration-quick) var(--ease-transition)}._channel-sidebar-item_1w0n4_13:hover ._channel-sidebar-item__trailing-visual--with-menu_1w0n4_177,._channel-sidebar-item_1w0n4_13:focus-within ._channel-sidebar-item__trailing-visual--with-menu_1w0n4_177{opacity:0;pointer-events:none}._channel-sidebar-item__group-icon_1w0n4_181{width:var(--icon-size-16);height:var(--icon-size-16);display:flex;align-items:center;justify-content:center;background:rgba(var(--sidebar-text-rgb),.16);border-radius:var(--radius-s);font-family:var(--font-family-body);font-size:var(--font-size-50);font-weight:var(--font-weight-semibold);line-height:var(--line-height-25);letter-spacing:.01em;color:var(--sidebar-text);opacity:.72}._channel-sidebar-item__content_1w0n4_197{display:flex;align-items:center;flex:1;min-width:0;gap:var(--spacing-xs);padding:var(--spacing-xxxxs)}._channel-sidebar-item__name_1w0n4_205{font-family:var(--font-family-body);font-size:var(--font-size-100);font-weight:var(--font-weight-regular);line-height:var(--line-height-100);letter-spacing:.02em;color:var(--sidebar-text);opacity:.72;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:144px}._channel-sidebar-item__status-hint_1w0n4_218{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}._channel-sidebar-item__shared-icon_1w0n4_229{display:flex;align-items:center;flex-shrink:0;padding:var(--spacing-xxxs) 0;color:var(--sidebar-text);opacity:.72}._channel-sidebar-item__custom-status_1w0n4_237{display:flex;align-items:center;flex-shrink:0;font-size:var(--font-size-200);line-height:var(--line-height-25);opacity:.8}._channel-sidebar-item__right_1w0n4_245{display:flex;align-items:center;justify-content:flex-end;flex-shrink:0;gap:var(--spacing-xxxxs);padding-right:var(--spacing-l);color:var(--sidebar-text)}._channel-sidebar-item__call_1w0n4_254{display:flex;align-items:center;justify-content:center;padding:var(--spacing-xxxs);border-radius:var(--radius-s)}._channel-sidebar-item--actions-open_1w0n4_261 ._channel-sidebar-item__mention-badge_1w0n4_31,._channel-sidebar-item--actions-open_1w0n4_261 ._channel-sidebar-item__trailing-visual--with-menu_1w0n4_177{opacity:0;pointer-events:none}._channel-sidebar-item--actions-always_1w0n4_266 ._channel-sidebar-item__right_1w0n4_245{padding-right:calc(var(--spacing-l) + var(--icon-size-24))}._channel-sidebar-item--no-hover-menu_1w0n4_269:hover ._channel-sidebar-item__mention-badge_1w0n4_31,._channel-sidebar-item--no-hover-menu_1w0n4_269:focus-within ._channel-sidebar-item__mention-badge_1w0n4_31{opacity:1;pointer-events:auto}._channel-sidebar-item--text-only_1w0n4_276 ._channel-sidebar-item__left_1w0n4_125{gap:0}._channel-sidebar-item--active_1w0n4_115{background:rgba(var(--sidebar-text-rgb),.12)}._channel-sidebar-item--active_1w0n4_115 ._channel-sidebar-item__left_1w0n4_125{padding-left:var(--spacing-l)}._channel-sidebar-item--active_1w0n4_115 ._channel-sidebar-item__name_1w0n4_205,._channel-sidebar-item--status-unread_1w0n4_288 ._channel-sidebar-item__icon-container_1w0n4_148,._channel-sidebar-item--status-mention_1w0n4_288 ._channel-sidebar-item__icon-container_1w0n4_148{opacity:1}._channel-sidebar-item--status-unread_1w0n4_288 ._channel-sidebar-item__name_1w0n4_205,._channel-sidebar-item--status-mention_1w0n4_288 ._channel-sidebar-item__name_1w0n4_205{font-weight:var(--font-weight-semibold);opacity:1}._channel-sidebar-item--drafts_1w0n4_295 ._channel-sidebar-item__icon-container_1w0n4_148{opacity:.64}._channel-sidebar-item--drafts_1w0n4_295 ._channel-sidebar-item__name_1w0n4_205{font-weight:var(--font-weight-regular);opacity:.72}._channel-sidebar-item--drafts_1w0n4_295 ._channel-sidebar-item__mention-badge_1w0n4_31{min-width:0}._channel-sidebar-item--drafts_1w0n4_295 ._channel-sidebar-item__mention-badge_1w0n4_31>*{background-color:transparent;color:var(--sidebar-text);padding-left:0;padding-right:var(--spacing-xxs)}._channel-sidebar-item--drafts_1w0n4_295._channel-sidebar-item--active_1w0n4_115 ._channel-sidebar-item__name_1w0n4_205{opacity:1}._channel-sidebar-item--muted_1w0n4_314 ._channel-sidebar-item__icon-container_1w0n4_148,._channel-sidebar-item--muted_1w0n4_314 ._channel-sidebar-item__name_1w0n4_205,._channel-sidebar-item--muted_1w0n4_314 ._channel-sidebar-item__shared-icon_1w0n4_229{opacity:.4}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import { BuiltInButtonProps } from '../../utils/props';
|
|
2
3
|
export type ChannelSidebarItemLeadingVisual = 'public' | 'private' | 'group-message' | 'direct-message' | 'drafts' | 'insights' | 'threads' | 'dial-pad';
|
|
3
4
|
export type ChannelSidebarItemStatus = 'read' | 'unread' | 'mention';
|
|
4
5
|
export interface ChannelSidebarItemProps {
|
|
@@ -10,8 +11,23 @@ export interface ChannelSidebarItemProps {
|
|
|
10
11
|
* overflow menu; name aligns with channel sidebar label padding.
|
|
11
12
|
*/
|
|
12
13
|
hideLeadingVisual?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Leading visual. A built-in type string (`'public'`, `'private'`, …) keeps its
|
|
16
|
+
* glyph; any other node (not a string) replaces the icon, like `MenuItem`. Custom
|
|
17
|
+
* nodes render in the same 24px icon column, so the label stays aligned. For an
|
|
18
|
+
* icon use `<Icon glyph={<SomeIcon />} />` — the size (16) comes from context.
|
|
19
|
+
* A 16–24px element such as a 20px avatar is centered in the column.
|
|
20
|
+
* Default: Public. Ignored when `hideLeadingVisual`.
|
|
21
|
+
*/
|
|
22
|
+
leadingVisual?: ChannelSidebarItemLeadingVisual | ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Custom content for the trailing slot, after the name and before the mention
|
|
25
|
+
* badge / menu button (e.g. a responding indicator). Status-only: on rows with
|
|
26
|
+
* the overflow menu it fades out on hover / focus, like the mention badge, so
|
|
27
|
+
* don't put interactive content in it. `status` styling is independent of it.
|
|
28
|
+
* When omitted, nothing is rendered.
|
|
29
|
+
*/
|
|
30
|
+
trailingVisual?: ReactNode;
|
|
15
31
|
/** Read/unread/mention state. Default: Read. */
|
|
16
32
|
status?: ChannelSidebarItemStatus;
|
|
17
33
|
/** Highlighted as the currently active item. */
|
|
@@ -26,14 +42,21 @@ export interface ChannelSidebarItemProps {
|
|
|
26
42
|
mentionCount?: number;
|
|
27
43
|
/** Member count shown in the group icon when leadingVisual='group-message'. */
|
|
28
44
|
memberCount?: number;
|
|
29
|
-
/** Avatar image URL for leadingVisual='direct-message'. */
|
|
45
|
+
/** Avatar image URL for leadingVisual='direct-message' (not used with a custom node). */
|
|
30
46
|
avatarSrc?: string;
|
|
31
47
|
/** Avatar alt text for leadingVisual='direct-message'. */
|
|
32
48
|
avatarAlt?: string;
|
|
33
|
-
/** Shows status badge on the avatar when leadingVisual='direct-message'. */
|
|
49
|
+
/** Shows status badge on the avatar when leadingVisual='direct-message' (not used with a custom node). */
|
|
34
50
|
showAvatarStatus?: boolean;
|
|
35
|
-
/** Custom status emoji
|
|
36
|
-
customStatusEmoji?:
|
|
51
|
+
/** Custom status emoji after the name for a direct message or a custom leading visual. A node can carry a tooltip trigger. */
|
|
52
|
+
customStatusEmoji?: ReactNode;
|
|
53
|
+
/**
|
|
54
|
+
* Visually hidden description of the custom status (for example "🌴 Out of
|
|
55
|
+
* office"), read with the row name. The emoji itself stays `aria-hidden`, so
|
|
56
|
+
* pass this whenever `customStatusEmoji` carries meaning. Accepts translated
|
|
57
|
+
* nodes.
|
|
58
|
+
*/
|
|
59
|
+
customStatusLabel?: ReactNode;
|
|
37
60
|
onClick?: () => void;
|
|
38
61
|
/** Overflow menu (kebab). Sibling of the channel control so it is keyboard-reachable. */
|
|
39
62
|
onMenuClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
@@ -43,11 +66,47 @@ export interface ChannelSidebarItemProps {
|
|
|
43
66
|
unreadLabel?: ReactNode;
|
|
44
67
|
/** Accessible name for the overflow menu button. Default: "Channel options". */
|
|
45
68
|
menuLabel?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Interactive controls (e.g. an `IconButton`) shown at the right edge, in the
|
|
71
|
+
* overflow menu's place: it replaces the built-in menu. Unlike
|
|
72
|
+
* `trailingVisual`, actions stay clickable. See `actionsReveal`.
|
|
73
|
+
*/
|
|
74
|
+
actions?: ReactNode;
|
|
75
|
+
/**
|
|
76
|
+
* When `actions` show. `hover` (default): hidden until the row is hovered or
|
|
77
|
+
* has focus, like the built-in menu (the mention badge and `trailingVisual`
|
|
78
|
+
* give way). `always`: visible, slightly dimmed, at rest and at full
|
|
79
|
+
* strength on hover / focus; the badge and `trailingVisual` stay visible
|
|
80
|
+
* beside it.
|
|
81
|
+
*/
|
|
82
|
+
actionsReveal?: 'hover' | 'always';
|
|
83
|
+
/** Keeps `actions` revealed, e.g. while a menu opened from them is open. */
|
|
84
|
+
actionsOpen?: boolean;
|
|
85
|
+
/** Hides the built-in overflow menu without adding `actions`. */
|
|
86
|
+
hideMenu?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Turns the row into the parent of a collapsible group: shows a chevron
|
|
89
|
+
* toggle in the left gutter (revealed on hover / focus) and sets
|
|
90
|
+
* `aria-expanded` on it. The row itself stays a navigation control; the
|
|
91
|
+
* group's list and animation are up to the host. Omit for a normal row.
|
|
92
|
+
*/
|
|
93
|
+
expanded?: boolean;
|
|
94
|
+
/** Called with the next state when the chevron toggle is activated. */
|
|
95
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
96
|
+
/** `id` of the list the toggle controls (`aria-controls`). */
|
|
97
|
+
controlsId?: string;
|
|
98
|
+
/**
|
|
99
|
+
* Accessible name of the toggle. It stays the same in both states;
|
|
100
|
+
* `aria-expanded` carries the state. Default: "Toggle".
|
|
101
|
+
*/
|
|
102
|
+
toggleLabel?: string;
|
|
103
|
+
/** Extra attributes for the chevron toggle button. */
|
|
104
|
+
toggleButtonProps?: BuiltInButtonProps;
|
|
46
105
|
}
|
|
47
106
|
/**
|
|
48
107
|
* The Channel Sidebar Item is the row people use to move between channels, DMs, and group
|
|
49
108
|
* messages. It compresses a lot of state — channel type, unread, mention count, mute,
|
|
50
109
|
* in-call — into a single, scannable line.
|
|
51
110
|
*/
|
|
52
|
-
export default function ChannelSidebarItem({ className, name, hideLeadingVisual, leadingVisual, status, active, muted, callActive, sharedChannel, mentionCount, memberCount, avatarSrc, showAvatarStatus, customStatusEmoji, onClick, onMenuClick, formatMentionLabel, unreadLabel, menuLabel, }: ChannelSidebarItemProps): import("react/jsx-runtime").JSX.Element;
|
|
111
|
+
export default function ChannelSidebarItem({ className, name, hideLeadingVisual, leadingVisual, trailingVisual, status, active, muted, callActive, sharedChannel, mentionCount, memberCount, avatarSrc, showAvatarStatus, customStatusEmoji, customStatusLabel, onClick, onMenuClick, formatMentionLabel, unreadLabel, menuLabel, actions, actionsReveal, actionsOpen, hideMenu, expanded, onExpandedChange, controlsId, toggleLabel, toggleButtonProps, }: ChannelSidebarItemProps): import("react/jsx-runtime").JSX.Element;
|
|
53
112
|
//# sourceMappingURL=ChannelSidebarItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChannelSidebarItem.d.ts","sourceRoot":"","sources":["../../../src/components/channel-sidebar-item/ChannelSidebarItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAgBnD,MAAM,MAAM,+BAA+B,GACvC,QAAQ,GACR,SAAS,GACT,eAAe,GACf,gBAAgB,GAChB,QAAQ,GACR,UAAU,GACV,SAAS,GACT,UAAU,CAAC;AAEf,MAAM,MAAM,wBAAwB,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;AAErE,MAAM,WAAW,uBAAuB;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,IAAI,EAAE,SAAS,CAAC;IAChB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B
|
|
1
|
+
{"version":3,"file":"ChannelSidebarItem.d.ts","sourceRoot":"","sources":["../../../src/components/channel-sidebar-item/ChannelSidebarItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAgBnD,OAAO,EAAmB,KAAK,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAGzE,MAAM,MAAM,+BAA+B,GACvC,QAAQ,GACR,SAAS,GACT,eAAe,GACf,gBAAgB,GAChB,QAAQ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
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
1
|
+
import { jsxs as b, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import __ae from "@mattermost/compass-icons/components/globe.js";const ae=__ae&&__ae.default?__ae.default:__ae;
|
|
3
|
+
import __ie from "@mattermost/compass-icons/components/lock-outline.js";const ie=__ie&&__ie.default?__ie.default:__ie;
|
|
4
|
+
import __ne from "@mattermost/compass-icons/components/message-text-outline.js";const ne=__ne&&__ne.default?__ne.default:__ne;
|
|
5
|
+
import __se from "@mattermost/compass-icons/components/send-outline.js";const se=__se&&__se.default?__se.default:__se;
|
|
6
|
+
import __re from "@mattermost/compass-icons/components/chart-line.js";const re=__re&&__re.default?__re.default:__re;
|
|
7
|
+
import __te from "@mattermost/compass-icons/components/circle-multiple-outline.js";const te=__te&&__te.default?__te.default:__te;
|
|
8
|
+
import __ce from "@mattermost/compass-icons/components/phone-in-talk.js";const ce=__ce&&__ce.default?__ce.default:__ce;
|
|
9
|
+
import __le from "@mattermost/compass-icons/components/dots-vertical.js";const le=__le&&__le.default?__le.default:__le;
|
|
10
|
+
import __me from "@mattermost/compass-icons/components/dialpad.js";const me=__me&&__me.default?__me.default:__me;
|
|
11
|
+
import __oe from "@mattermost/compass-icons/components/chevron-down.js";const oe=__oe&&__oe.default?__oe.default:__oe;
|
|
12
|
+
import __de from "@mattermost/compass-icons/components/chevron-right.js";const de=__de&&__de.default?__de.default:__de;
|
|
13
|
+
import he from "../user-avatar/UserAvatar.js";
|
|
14
|
+
import be from "../mention-badge/MentionBadge.js";
|
|
15
|
+
import z, { IconSlotContext as S } from "../icon/Icon.js";
|
|
16
|
+
import _e from "../icon-button/IconButton.js";
|
|
17
|
+
import { mergeClassNames as k } from "../../utils/props.js";
|
|
15
18
|
import a from "./ChannelSidebarItem.module.scss.js";
|
|
16
|
-
const
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
const fe = (i) => `${i} mention${i === 1 ? "" : "s"}`;
|
|
20
|
+
function x(i) {
|
|
21
|
+
return i === void 0 || typeof i == "string";
|
|
22
|
+
}
|
|
23
|
+
function ue({
|
|
24
|
+
leadingVisual: i,
|
|
25
|
+
memberCount: _,
|
|
26
|
+
avatarSrc: s,
|
|
27
|
+
showAvatarStatus: r
|
|
22
28
|
}) {
|
|
23
|
-
switch (
|
|
29
|
+
switch (i) {
|
|
24
30
|
case "private":
|
|
25
|
-
return /* @__PURE__ */ e(
|
|
31
|
+
return /* @__PURE__ */ e(ie, { size: 16 });
|
|
26
32
|
case "group-message":
|
|
27
|
-
return /* @__PURE__ */ e("div", { className: a["channel-sidebar-item__group-icon"], children:
|
|
33
|
+
return /* @__PURE__ */ e("div", { className: a["channel-sidebar-item__group-icon"], children: _ ?? 2 });
|
|
28
34
|
case "direct-message":
|
|
29
35
|
return /* @__PURE__ */ e(
|
|
30
|
-
|
|
36
|
+
he,
|
|
31
37
|
{
|
|
32
|
-
src:
|
|
38
|
+
src: s ?? "",
|
|
33
39
|
alt: "",
|
|
34
40
|
size: "20",
|
|
35
|
-
status: !!
|
|
41
|
+
status: !!r
|
|
36
42
|
}
|
|
37
43
|
);
|
|
38
44
|
case "drafts":
|
|
39
|
-
return /* @__PURE__ */ e(
|
|
45
|
+
return /* @__PURE__ */ e(se, { size: 16 });
|
|
40
46
|
case "insights":
|
|
41
|
-
return /* @__PURE__ */ e(
|
|
47
|
+
return /* @__PURE__ */ e(re, { size: 16 });
|
|
42
48
|
case "threads":
|
|
43
|
-
return /* @__PURE__ */ e(
|
|
49
|
+
return /* @__PURE__ */ e(ne, { size: 16 });
|
|
44
50
|
case "dial-pad":
|
|
45
|
-
return /* @__PURE__ */ e(
|
|
51
|
+
return /* @__PURE__ */ e(me, { size: 16 });
|
|
46
52
|
case "public":
|
|
47
53
|
default:
|
|
48
|
-
return /* @__PURE__ */ e(
|
|
54
|
+
return /* @__PURE__ */ e(ae, { size: 16 });
|
|
49
55
|
}
|
|
50
56
|
}
|
|
51
|
-
function
|
|
52
|
-
className:
|
|
53
|
-
name:
|
|
54
|
-
hideLeadingVisual:
|
|
55
|
-
leadingVisual:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
57
|
+
function xe({
|
|
58
|
+
className: i,
|
|
59
|
+
name: _,
|
|
60
|
+
hideLeadingVisual: s = !1,
|
|
61
|
+
leadingVisual: r,
|
|
62
|
+
trailingVisual: f,
|
|
63
|
+
status: y = "read",
|
|
64
|
+
active: u = !1,
|
|
65
|
+
muted: F = !1,
|
|
66
|
+
callActive: G = !1,
|
|
67
|
+
sharedChannel: R = !1,
|
|
68
|
+
mentionCount: C,
|
|
69
|
+
memberCount: U,
|
|
70
|
+
avatarSrc: q,
|
|
71
|
+
showAvatarStatus: J = !1,
|
|
72
|
+
customStatusEmoji: w,
|
|
73
|
+
customStatusLabel: D,
|
|
74
|
+
onClick: K,
|
|
75
|
+
onMenuClick: p,
|
|
76
|
+
formatMentionLabel: Q = fe,
|
|
77
|
+
unreadLabel: W = "unread",
|
|
78
|
+
menuLabel: X = "Channel options",
|
|
79
|
+
actions: v,
|
|
80
|
+
actionsReveal: Y = "hover",
|
|
81
|
+
actionsOpen: O = !1,
|
|
82
|
+
hideMenu: Z = !1,
|
|
83
|
+
expanded: l,
|
|
84
|
+
onExpandedChange: N,
|
|
85
|
+
controlsId: j,
|
|
86
|
+
toggleLabel: L = "Toggle",
|
|
87
|
+
toggleButtonProps: n
|
|
71
88
|
}) {
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
),
|
|
89
|
+
const t = !s && r !== null && !x(r), m = x(
|
|
90
|
+
r
|
|
91
|
+
) ? r ?? "public" : "public", I = !s && m === "direct-message" && !t, M = !s && m === "drafts" && !t, o = M && y === "unread" ? "read" : y, E = o === "mention", V = !s && (t || ["public", "private", "group-message", "direct-message"].includes(
|
|
92
|
+
m
|
|
93
|
+
)), c = v != null && v !== !1, d = c && Y === "always", T = V && !Z && !c, A = T || c && !d, B = l !== void 0, g = [
|
|
75
94
|
a["channel-sidebar-item"],
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
a[`channel-sidebar-item--status-${
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
95
|
+
s ? a["channel-sidebar-item--text-only"] : "",
|
|
96
|
+
u ? a["channel-sidebar-item--active"] : "",
|
|
97
|
+
F ? a["channel-sidebar-item--muted"] : "",
|
|
98
|
+
a[`channel-sidebar-item--status-${o.toLowerCase()}`],
|
|
99
|
+
M ? a["channel-sidebar-item--drafts"] : "",
|
|
100
|
+
d ? a["channel-sidebar-item--actions-always"] : "",
|
|
101
|
+
A ? "" : a["channel-sidebar-item--no-hover-menu"],
|
|
102
|
+
c && O && !d ? a["channel-sidebar-item--actions-open"] : "",
|
|
103
|
+
i
|
|
104
|
+
].filter(Boolean).join(" "), P = [
|
|
83
105
|
a["channel-sidebar-item__icon-container"],
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
/* @__PURE__ */
|
|
106
|
+
I ? a["channel-sidebar-item__icon-container--dm"] : "",
|
|
107
|
+
t ? a["channel-sidebar-item__icon-container--custom"] : ""
|
|
108
|
+
].filter(Boolean).join(" "), ee = a["channel-sidebar-item__right"], $ = o === "mention" ? Q(C ?? 1) : o === "unread" ? W : void 0;
|
|
109
|
+
return /* @__PURE__ */ b("div", { className: g, children: [
|
|
110
|
+
u && /* @__PURE__ */ e("div", { className: a["channel-sidebar-item__active-border"] }),
|
|
111
|
+
/* @__PURE__ */ b(
|
|
89
112
|
"button",
|
|
90
113
|
{
|
|
91
114
|
type: "button",
|
|
92
115
|
className: a["channel-sidebar-item__left"],
|
|
93
|
-
onClick:
|
|
94
|
-
"aria-current":
|
|
116
|
+
onClick: K,
|
|
117
|
+
"aria-current": u ? !0 : void 0,
|
|
95
118
|
children: [
|
|
96
|
-
!
|
|
97
|
-
|
|
119
|
+
!s && /* @__PURE__ */ e("div", { className: P, "aria-hidden": !0, children: t ? /* @__PURE__ */ e(S.Provider, { value: { size: "16" }, children: r }) : /* @__PURE__ */ e(
|
|
120
|
+
ue,
|
|
98
121
|
{
|
|
99
|
-
leadingVisual:
|
|
100
|
-
memberCount:
|
|
101
|
-
avatarSrc:
|
|
102
|
-
showAvatarStatus:
|
|
122
|
+
leadingVisual: m,
|
|
123
|
+
memberCount: U,
|
|
124
|
+
avatarSrc: q,
|
|
125
|
+
showAvatarStatus: J
|
|
103
126
|
}
|
|
104
127
|
) }),
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
-
/* @__PURE__ */ e("span", { className: a["channel-sidebar-item__name"], children:
|
|
107
|
-
|
|
108
|
-
|
|
128
|
+
/* @__PURE__ */ b("div", { className: a["channel-sidebar-item__content"], children: [
|
|
129
|
+
/* @__PURE__ */ e("span", { className: a["channel-sidebar-item__name"], children: _ }),
|
|
130
|
+
$ && /* @__PURE__ */ e("span", { className: a["channel-sidebar-item__status-hint"], children: $ }),
|
|
131
|
+
R && /* @__PURE__ */ e(
|
|
109
132
|
"span",
|
|
110
133
|
{
|
|
111
134
|
className: a["channel-sidebar-item__shared-icon"],
|
|
112
135
|
"aria-hidden": !0,
|
|
113
|
-
children: /* @__PURE__ */ e(
|
|
136
|
+
children: /* @__PURE__ */ e(z, { glyph: /* @__PURE__ */ e(te, {}), size: "12" })
|
|
114
137
|
}
|
|
115
138
|
),
|
|
116
|
-
|
|
139
|
+
(I || t) && D && /* @__PURE__ */ e("span", { className: a["channel-sidebar-item__status-hint"], children: D }),
|
|
140
|
+
(I || t) && w && /* @__PURE__ */ e(
|
|
117
141
|
"span",
|
|
118
142
|
{
|
|
119
143
|
className: a["channel-sidebar-item__custom-status"],
|
|
120
144
|
"aria-hidden": !0,
|
|
121
|
-
children:
|
|
145
|
+
children: w
|
|
122
146
|
}
|
|
123
147
|
)
|
|
124
148
|
] })
|
|
125
149
|
]
|
|
126
150
|
}
|
|
127
151
|
),
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
-
|
|
130
|
-
|
|
152
|
+
B && /* @__PURE__ */ e(
|
|
153
|
+
"button",
|
|
154
|
+
{
|
|
155
|
+
type: "button",
|
|
156
|
+
...n,
|
|
157
|
+
...j ? { "aria-controls": j } : {},
|
|
158
|
+
className: k(
|
|
159
|
+
a["channel-sidebar-item__toggle"],
|
|
160
|
+
n == null ? void 0 : n.className
|
|
161
|
+
),
|
|
162
|
+
"aria-expanded": l,
|
|
163
|
+
"aria-label": L,
|
|
164
|
+
onClick: (h) => {
|
|
165
|
+
var H;
|
|
166
|
+
(H = n == null ? void 0 : n.onClick) == null || H.call(n, h), N == null || N(!l);
|
|
167
|
+
},
|
|
168
|
+
children: /* @__PURE__ */ e(
|
|
169
|
+
z,
|
|
170
|
+
{
|
|
171
|
+
glyph: l ? /* @__PURE__ */ e(oe, {}) : /* @__PURE__ */ e(de, {}),
|
|
172
|
+
size: "12"
|
|
173
|
+
}
|
|
174
|
+
)
|
|
175
|
+
}
|
|
176
|
+
),
|
|
177
|
+
/* @__PURE__ */ b("div", { className: ee, children: [
|
|
178
|
+
f != null && f !== !1 && /* @__PURE__ */ e(
|
|
179
|
+
"span",
|
|
180
|
+
{
|
|
181
|
+
className: [
|
|
182
|
+
a["channel-sidebar-item__trailing-visual"],
|
|
183
|
+
A ? a["channel-sidebar-item__trailing-visual--with-menu"] : ""
|
|
184
|
+
].filter(Boolean).join(" "),
|
|
185
|
+
children: /* @__PURE__ */ e(S.Provider, { value: { size: "16" }, children: f })
|
|
186
|
+
}
|
|
187
|
+
),
|
|
188
|
+
G && /* @__PURE__ */ e("div", { className: a["channel-sidebar-item__call"], "aria-hidden": !0, children: /* @__PURE__ */ e(ce, { size: 12 }) }),
|
|
189
|
+
E && /* @__PURE__ */ e(
|
|
131
190
|
"span",
|
|
132
191
|
{
|
|
133
192
|
className: a["channel-sidebar-item__mention-badge"],
|
|
134
193
|
"aria-hidden": !0,
|
|
135
194
|
children: /* @__PURE__ */ e(
|
|
136
|
-
|
|
195
|
+
be,
|
|
137
196
|
{
|
|
138
|
-
count:
|
|
197
|
+
count: C ?? 1,
|
|
139
198
|
location: "sidebar",
|
|
140
199
|
size: "medium"
|
|
141
200
|
}
|
|
142
201
|
)
|
|
143
202
|
}
|
|
144
203
|
),
|
|
145
|
-
|
|
146
|
-
|
|
204
|
+
c && /* @__PURE__ */ e(
|
|
205
|
+
"span",
|
|
206
|
+
{
|
|
207
|
+
className: k(
|
|
208
|
+
a["channel-sidebar-item__actions"],
|
|
209
|
+
d && a["channel-sidebar-item__actions--always"],
|
|
210
|
+
O && a["channel-sidebar-item__actions--open"]
|
|
211
|
+
),
|
|
212
|
+
children: v
|
|
213
|
+
}
|
|
214
|
+
),
|
|
215
|
+
T && /* @__PURE__ */ e("span", { className: a["channel-sidebar-item__menu-button"], children: /* @__PURE__ */ e(
|
|
216
|
+
_e,
|
|
147
217
|
{
|
|
148
218
|
className: a["channel-sidebar-item__menu-icon"],
|
|
149
219
|
size: "x-small",
|
|
150
220
|
style: "inverted",
|
|
151
|
-
icon: /* @__PURE__ */ e(
|
|
152
|
-
"aria-label":
|
|
153
|
-
onClick: (
|
|
154
|
-
|
|
221
|
+
icon: /* @__PURE__ */ e(z, { glyph: /* @__PURE__ */ e(le, {}) }),
|
|
222
|
+
"aria-label": X,
|
|
223
|
+
onClick: (h) => {
|
|
224
|
+
h.stopPropagation(), p == null || p(h);
|
|
155
225
|
}
|
|
156
226
|
}
|
|
157
227
|
) })
|
|
@@ -159,6 +229,6 @@ function oe({
|
|
|
159
229
|
] });
|
|
160
230
|
}
|
|
161
231
|
export {
|
|
162
|
-
|
|
232
|
+
xe as default
|
|
163
233
|
};
|
|
164
234
|
//# sourceMappingURL=ChannelSidebarItem.js.map
|