@mattermost/compass-ui 0.1.0-alpha.26 → 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.cjs +1 -1
- package/dist/components/empty-state/EmptyState.cjs.map +1 -1
- package/dist/components/empty-state/EmptyState.css +1 -1
- package/dist/components/empty-state/EmptyState.d.ts +21 -1
- package/dist/components/empty-state/EmptyState.d.ts.map +1 -1
- package/dist/components/empty-state/EmptyState.js +30 -23
- package/dist/components/empty-state/EmptyState.js.map +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/empty-state/index.d.ts +1 -1
- package/dist/components/empty-state/index.d.ts.map +1 -1
- 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,55 +1,57 @@
|
|
|
1
|
-
import { jsxs as M, jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
|
|
1
|
+
import { jsxs as M, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Sr, useId as Fr, useRef as O, useCallback as d, useState as I, useMemo as E, useEffect as me } from "react";
|
|
3
|
+
import __Lr from "@mattermost/compass-icons/components/chevron-down.js";const Lr=__Lr&&__Lr.default?__Lr.default:__Lr;
|
|
4
|
+
import __Tr from "@mattermost/compass-icons/components/close-circle.js";const Tr=__Tr&&__Tr.default?__Tr.default:__Tr;
|
|
5
|
+
import __Cr from "@mattermost/compass-icons/components/plus.js";const Cr=__Cr&&__Cr.default?__Cr.default:__Cr;
|
|
6
|
+
import $r from "../chip/Chip.js";
|
|
7
|
+
import zr from "../chip/ChipGroup.js";
|
|
8
|
+
import be, { IconSlotContext as Hr } from "../icon/Icon.js";
|
|
9
|
+
import { mergeFieldDescribedBy as Or, hasFieldMessage as jr, isFieldInvalid as Ur } from "../field/fieldDescribedBy.js";
|
|
10
|
+
import qr from "../field-message/FieldMessage.js";
|
|
11
|
+
import $e from "../menu-item/MenuItem.js";
|
|
12
|
+
import Gr, { PopoverMenuScroll as Kr } from "../popover-menu/PopoverMenu.js";
|
|
13
|
+
import Qr from "../spinner/Spinner.js";
|
|
14
|
+
import Xr from "../team-avatar/TeamAvatar.js";
|
|
15
|
+
import Zr from "../user-avatar/UserAvatar.js";
|
|
16
|
+
import { useAnchoredPopupPortal as Wr } from "../../hooks/use-anchored-popup-portal.js";
|
|
17
|
+
import { useOutsideClose as Yr } from "../../hooks/use-outside-close.js";
|
|
18
|
+
import { usePopoverTransition as Jr } from "../../hooks/use-popover-transition.js";
|
|
19
|
+
import { mergeMenuItemProps as Pr } from "../../utils/menuItemProps.js";
|
|
20
|
+
import { mergeClassNames as Br } from "../../utils/props.js";
|
|
21
|
+
import { toKebab as en } from "../../utils/string.js";
|
|
22
|
+
import l from "./Combobox.module.scss.js";
|
|
23
|
+
const ze = 280, rn = {
|
|
22
24
|
small: "small",
|
|
23
25
|
medium: "medium",
|
|
24
26
|
large: "large"
|
|
25
|
-
},
|
|
27
|
+
}, nn = {
|
|
26
28
|
small: "12",
|
|
27
29
|
medium: "16",
|
|
28
30
|
large: "16"
|
|
29
31
|
};
|
|
30
|
-
function
|
|
32
|
+
function tn(n) {
|
|
31
33
|
return typeof n == "string" ? `${n} selections` : "Selected";
|
|
32
34
|
}
|
|
33
|
-
function
|
|
35
|
+
function an(n) {
|
|
34
36
|
return `Create "${n}"`;
|
|
35
37
|
}
|
|
36
|
-
function
|
|
38
|
+
function Y(n) {
|
|
37
39
|
return n.kind === "option" && n.option.disabled === !0;
|
|
38
40
|
}
|
|
39
|
-
function
|
|
41
|
+
function on(n, v) {
|
|
40
42
|
return v ? n.label.toLowerCase().includes(v.toLowerCase()) : !0;
|
|
41
43
|
}
|
|
42
|
-
function
|
|
44
|
+
function ln(n) {
|
|
43
45
|
return n == null ? null : Array.isArray(n) ? n[0] ?? null : n === "" ? null : n;
|
|
44
46
|
}
|
|
45
|
-
function
|
|
47
|
+
function sn(n) {
|
|
46
48
|
return n == null ? [] : Array.isArray(n) ? n : n === "" ? [] : [n];
|
|
47
49
|
}
|
|
48
|
-
function
|
|
50
|
+
function cn(n) {
|
|
49
51
|
if (n.leadingVisual != null) return n.leadingVisual;
|
|
50
52
|
if (n.leadingAvatar != null)
|
|
51
|
-
return /* @__PURE__ */
|
|
52
|
-
|
|
53
|
+
return /* @__PURE__ */ o(
|
|
54
|
+
Zr,
|
|
53
55
|
{
|
|
54
56
|
src: n.leadingAvatar.src,
|
|
55
57
|
alt: n.leadingAvatar.alt,
|
|
@@ -57,8 +59,8 @@ function Br(n) {
|
|
|
57
59
|
}
|
|
58
60
|
);
|
|
59
61
|
if (n.leadingTeamAvatar != null)
|
|
60
|
-
return /* @__PURE__ */
|
|
61
|
-
|
|
62
|
+
return /* @__PURE__ */ o(
|
|
63
|
+
Xr,
|
|
62
64
|
{
|
|
63
65
|
src: n.leadingTeamAvatar.src,
|
|
64
66
|
initials: n.leadingTeamAvatar.initials ?? (n.leadingTeamAvatar.src ? void 0 : Array.from(n.label).slice(0, 2).join("")),
|
|
@@ -68,119 +70,121 @@ function Br(n) {
|
|
|
68
70
|
}
|
|
69
71
|
);
|
|
70
72
|
}
|
|
71
|
-
const
|
|
73
|
+
const Sn = Sr(function({
|
|
72
74
|
options: v,
|
|
73
|
-
menuItemProps:
|
|
75
|
+
menuItemProps: He,
|
|
74
76
|
multiple: t = !1,
|
|
75
|
-
value:
|
|
76
|
-
defaultValue:
|
|
77
|
+
value: ve,
|
|
78
|
+
defaultValue: he,
|
|
77
79
|
onChange: j,
|
|
78
|
-
inputValue:
|
|
79
|
-
defaultInputValue:
|
|
80
|
+
inputValue: J,
|
|
81
|
+
defaultInputValue: Oe = "",
|
|
80
82
|
onInputChange: u,
|
|
81
|
-
label:
|
|
82
|
-
placeholder:
|
|
83
|
-
leadingIcon:
|
|
84
|
-
size:
|
|
85
|
-
invalid:
|
|
83
|
+
label: D,
|
|
84
|
+
placeholder: je,
|
|
85
|
+
leadingIcon: P,
|
|
86
|
+
size: B = "medium",
|
|
87
|
+
invalid: Ue = !1,
|
|
88
|
+
message: ee,
|
|
89
|
+
messageTone: xe,
|
|
86
90
|
disabled: _ = !1,
|
|
87
91
|
filter: U = !0,
|
|
88
|
-
emptyMessage:
|
|
89
|
-
loading:
|
|
90
|
-
loadingMessage:
|
|
92
|
+
emptyMessage: qe = "No results",
|
|
93
|
+
loading: ge = !1,
|
|
94
|
+
loadingMessage: Ge = "Loading…",
|
|
91
95
|
selectedOptions: A,
|
|
92
96
|
creatable: V = !1,
|
|
93
|
-
onCreateOption:
|
|
94
|
-
formatCreateLabel:
|
|
95
|
-
clearable:
|
|
96
|
-
openOnFocus:
|
|
97
|
-
submitOnEnter:
|
|
98
|
-
clearLabel:
|
|
97
|
+
onCreateOption: re,
|
|
98
|
+
formatCreateLabel: Ke = an,
|
|
99
|
+
clearable: Qe = !1,
|
|
100
|
+
openOnFocus: Xe = !1,
|
|
101
|
+
submitOnEnter: Ze = !0,
|
|
102
|
+
clearLabel: We = "Clear",
|
|
99
103
|
clearButtonProps: m,
|
|
100
|
-
selectionsLabel:
|
|
101
|
-
listboxLabel:
|
|
102
|
-
className:
|
|
103
|
-
id:
|
|
104
|
-
"aria-label":
|
|
105
|
-
"aria-describedby":
|
|
106
|
-
required:
|
|
107
|
-
onFocus:
|
|
108
|
-
onBlur:
|
|
109
|
-
onKeyDown:
|
|
110
|
-
portalContainer:
|
|
111
|
-
zIndex:
|
|
112
|
-
...
|
|
104
|
+
selectionsLabel: Ye,
|
|
105
|
+
listboxLabel: Je = "Options",
|
|
106
|
+
className: Pe = "",
|
|
107
|
+
id: Be,
|
|
108
|
+
"aria-label": _e,
|
|
109
|
+
"aria-describedby": er,
|
|
110
|
+
required: rr = !1,
|
|
111
|
+
onFocus: ne,
|
|
112
|
+
onBlur: te,
|
|
113
|
+
onKeyDown: ae,
|
|
114
|
+
portalContainer: nr = null,
|
|
115
|
+
zIndex: tr,
|
|
116
|
+
...ar
|
|
113
117
|
}, R) {
|
|
114
|
-
const
|
|
118
|
+
const or = Fr(), q = Be ?? or, S = `${q}-listbox`, oe = O(null), ye = O(null), w = O(null), lr = d(
|
|
115
119
|
(e) => {
|
|
116
|
-
|
|
120
|
+
w.current = e, typeof R == "function" ? R(e) : R && (R.current = e);
|
|
117
121
|
},
|
|
118
122
|
[R]
|
|
119
|
-
), le =
|
|
120
|
-
() => t ?
|
|
121
|
-
[t,
|
|
122
|
-
), b =
|
|
123
|
+
), le = ve !== void 0, [ir, sr] = I(() => he !== void 0 ? he : t ? [] : null), ie = le ? ve : ir, h = t ? null : ln(ie), i = E(
|
|
124
|
+
() => t ? sn(ie) : [],
|
|
125
|
+
[t, ie]
|
|
126
|
+
), b = J !== void 0, [se, F] = I(Oe), [c, pe] = I(!1), [cr, ke] = I(!1), [x, y] = I(-1), G = O(!1), L = O(null), Ae = d(
|
|
123
127
|
(e) => {
|
|
124
|
-
e !== x && (
|
|
128
|
+
e !== x && (G.current = !0, y(e));
|
|
125
129
|
},
|
|
126
130
|
[x]
|
|
127
|
-
), [
|
|
131
|
+
), [K, T] = I(null), Q = d(
|
|
128
132
|
(e) => v.find((r) => r.value === e) ?? (A == null ? void 0 : A.find((r) => r.value === e)) ?? (V ? { value: e, label: e } : void 0),
|
|
129
133
|
[v, A, V]
|
|
130
|
-
),
|
|
131
|
-
() => h == null ? void 0 :
|
|
132
|
-
[
|
|
133
|
-
),
|
|
134
|
+
), X = E(
|
|
135
|
+
() => h == null ? void 0 : Q(h),
|
|
136
|
+
[Q, h]
|
|
137
|
+
), ce = b ? J : t ? se : K !== null ? K : (X == null ? void 0 : X.label) ?? se, ue = b ? J : t ? se : K !== null ? K : "", C = d(
|
|
134
138
|
(e) => {
|
|
135
|
-
b || (
|
|
139
|
+
b || (F(e), t || T(e)), u == null || u(e);
|
|
136
140
|
},
|
|
137
141
|
[b, t, u]
|
|
138
142
|
), g = d(
|
|
139
143
|
(e) => {
|
|
140
|
-
le ||
|
|
144
|
+
le || sr(e), j == null || j(e);
|
|
141
145
|
},
|
|
142
146
|
[le, j]
|
|
143
|
-
),
|
|
147
|
+
), we = E(() => {
|
|
144
148
|
if (U === !1) return v;
|
|
145
|
-
const e = typeof U == "function" ? U :
|
|
146
|
-
return v.filter((r) => e(r,
|
|
147
|
-
}, [v, U,
|
|
148
|
-
if (
|
|
149
|
-
const e =
|
|
149
|
+
const e = typeof U == "function" ? U : on;
|
|
150
|
+
return v.filter((r) => e(r, ue));
|
|
151
|
+
}, [v, U, ue]), $ = V ? ue.trim() : "", De = E(() => {
|
|
152
|
+
if ($ === "") return !1;
|
|
153
|
+
const e = $.toLowerCase(), r = (k) => k.toLowerCase() === e;
|
|
150
154
|
return [...v, ...A ?? []].some((k) => r(k.label) || r(k.value)) ? !1 : !(t ? i : h != null ? [h] : []).some(r);
|
|
151
155
|
}, [
|
|
152
|
-
|
|
156
|
+
$,
|
|
153
157
|
v,
|
|
154
158
|
A,
|
|
155
159
|
t,
|
|
156
160
|
i,
|
|
157
161
|
h
|
|
158
|
-
]), s =
|
|
162
|
+
]), s = E(
|
|
159
163
|
() => [
|
|
160
|
-
...
|
|
161
|
-
...De ? [{ kind: "create", inputValue:
|
|
164
|
+
...we.map((e) => ({ kind: "option", option: e })),
|
|
165
|
+
...De ? [{ kind: "create", inputValue: $ }] : []
|
|
162
166
|
],
|
|
163
|
-
[
|
|
164
|
-
),
|
|
167
|
+
[we, De, $]
|
|
168
|
+
), N = d(
|
|
165
169
|
(e) => e.kind === "option" ? `${S}-option-${e.option.value}` : `${S}-create`,
|
|
166
170
|
[S]
|
|
167
|
-
), { mounted: Ne, visible:
|
|
168
|
-
placement:
|
|
169
|
-
maxHeight:
|
|
170
|
-
style:
|
|
171
|
-
portalRef:
|
|
172
|
-
renderPortal:
|
|
173
|
-
} =
|
|
174
|
-
preferredHeight:
|
|
175
|
-
maxHeightCap:
|
|
176
|
-
portalContainer:
|
|
177
|
-
zIndex:
|
|
171
|
+
), { mounted: Ne, visible: ur } = Jr(c), {
|
|
172
|
+
placement: fr,
|
|
173
|
+
maxHeight: dr,
|
|
174
|
+
style: mr,
|
|
175
|
+
portalRef: Me,
|
|
176
|
+
renderPortal: br
|
|
177
|
+
} = Wr(ye, Ne, {
|
|
178
|
+
preferredHeight: ze,
|
|
179
|
+
maxHeightCap: ze,
|
|
180
|
+
portalContainer: nr,
|
|
181
|
+
zIndex: tr
|
|
178
182
|
}), p = d(() => {
|
|
179
|
-
|
|
180
|
-
}, [t, b]),
|
|
181
|
-
_ ||
|
|
183
|
+
pe(!1), y(-1), !t && !b && (T(null), F(""));
|
|
184
|
+
}, [t, b]), z = d(() => {
|
|
185
|
+
_ || pe(!0);
|
|
182
186
|
}, [_]);
|
|
183
|
-
|
|
187
|
+
Yr(oe, c, p, Me), me(() => {
|
|
184
188
|
c && y((e) => {
|
|
185
189
|
if (s.length === 0) return -1;
|
|
186
190
|
if (e >= 0 && e < s.length) return e;
|
|
@@ -190,127 +194,127 @@ const pn = Mr(function({
|
|
|
190
194
|
return r >= 0 ? r : 0;
|
|
191
195
|
});
|
|
192
196
|
}, [c, s, t, i, h]);
|
|
193
|
-
const
|
|
197
|
+
const vr = d(
|
|
194
198
|
(e) => t ? i.includes(e) : h === e,
|
|
195
199
|
[t, i, h]
|
|
196
|
-
),
|
|
200
|
+
), fe = d(
|
|
197
201
|
(e) => {
|
|
198
202
|
var r;
|
|
199
203
|
if (!e.disabled) {
|
|
200
204
|
if (t) {
|
|
201
205
|
const a = i.includes(e.value) ? i.filter((f) => f !== e.value) : [...i, e.value];
|
|
202
|
-
g(a),
|
|
206
|
+
g(a), C(""), p(), (r = w.current) == null || r.focus();
|
|
203
207
|
return;
|
|
204
208
|
}
|
|
205
|
-
g(e.value), b ? u == null || u(e.label) : (
|
|
209
|
+
g(e.value), b ? u == null || u(e.label) : (F(""), T(null)), p();
|
|
206
210
|
}
|
|
207
211
|
},
|
|
208
212
|
[
|
|
209
213
|
t,
|
|
210
214
|
i,
|
|
211
215
|
g,
|
|
212
|
-
|
|
216
|
+
C,
|
|
213
217
|
b,
|
|
214
218
|
u,
|
|
215
219
|
p
|
|
216
220
|
]
|
|
217
|
-
),
|
|
221
|
+
), de = d(
|
|
218
222
|
(e) => {
|
|
219
223
|
var r;
|
|
220
|
-
if (
|
|
221
|
-
|
|
224
|
+
if (re ? re(e) : g(t ? [...i, e] : e), t) {
|
|
225
|
+
C(""), p(), (r = w.current) == null || r.focus();
|
|
222
226
|
return;
|
|
223
227
|
}
|
|
224
|
-
b ? u == null || u(e) : (
|
|
228
|
+
b ? u == null || u(e) : (F(""), T(null)), p();
|
|
225
229
|
},
|
|
226
230
|
[
|
|
227
|
-
|
|
231
|
+
re,
|
|
228
232
|
t,
|
|
229
233
|
i,
|
|
230
234
|
g,
|
|
231
|
-
|
|
235
|
+
C,
|
|
232
236
|
b,
|
|
233
237
|
u,
|
|
234
238
|
p
|
|
235
239
|
]
|
|
236
|
-
),
|
|
240
|
+
), hr = d(
|
|
237
241
|
(e) => {
|
|
238
|
-
e.kind === "create" ?
|
|
242
|
+
e.kind === "create" ? de(e.inputValue) : fe(e.option);
|
|
239
243
|
},
|
|
240
|
-
[
|
|
241
|
-
),
|
|
244
|
+
[de, fe]
|
|
245
|
+
), Ie = d(() => {
|
|
242
246
|
var e;
|
|
243
|
-
g(null), b ? u == null || u("") : (
|
|
247
|
+
g(null), b ? u == null || u("") : (F(""), T(null)), (e = w.current) == null || e.focus();
|
|
244
248
|
}, [g, b, u]), Ee = d(
|
|
245
249
|
(e) => {
|
|
246
250
|
t && g(i.filter((r) => r !== e));
|
|
247
251
|
},
|
|
248
252
|
[t, i, g]
|
|
249
|
-
),
|
|
253
|
+
), Ve = d(
|
|
250
254
|
(e) => {
|
|
251
|
-
|
|
252
|
-
const r = s.map((a, f) => ({ row: a, i: f })).filter(({ row: a }) => !
|
|
255
|
+
G.current = !1;
|
|
256
|
+
const r = s.map((a, f) => ({ row: a, i: f })).filter(({ row: a }) => !Y(a));
|
|
253
257
|
if (r.length === 0) {
|
|
254
258
|
y(-1);
|
|
255
259
|
return;
|
|
256
260
|
}
|
|
257
261
|
y((a) => {
|
|
258
|
-
const f = r.findIndex(({ i:
|
|
262
|
+
const f = r.findIndex(({ i: W }) => W === a), k = f < 0 ? e > 0 ? 0 : r.length - 1 : (f + e + r.length) % r.length;
|
|
259
263
|
return r[k].i;
|
|
260
264
|
});
|
|
261
265
|
},
|
|
262
266
|
[s]
|
|
263
267
|
);
|
|
264
|
-
|
|
268
|
+
me(() => {
|
|
265
269
|
var r, a;
|
|
266
270
|
if (!c || x < 0) return;
|
|
267
|
-
if (
|
|
268
|
-
|
|
271
|
+
if (G.current) {
|
|
272
|
+
G.current = !1;
|
|
269
273
|
return;
|
|
270
274
|
}
|
|
271
275
|
const e = s[x];
|
|
272
|
-
e && ((a = (r = document.getElementById(
|
|
273
|
-
}, [c, x, s,
|
|
274
|
-
const
|
|
275
|
-
|
|
276
|
+
e && ((a = (r = document.getElementById(N(e))) == null ? void 0 : r.scrollIntoView) == null || a.call(r, { block: "nearest" }));
|
|
277
|
+
}, [c, x, s, N]);
|
|
278
|
+
const xr = (e) => {
|
|
279
|
+
H();
|
|
276
280
|
const r = e.target.value;
|
|
277
|
-
|
|
278
|
-
},
|
|
281
|
+
C(r), c || z(), y(0);
|
|
282
|
+
}, H = () => {
|
|
279
283
|
L.current !== null && (cancelAnimationFrame(L.current), L.current = null);
|
|
280
284
|
};
|
|
281
|
-
|
|
282
|
-
const
|
|
283
|
-
|
|
285
|
+
me(() => H, []);
|
|
286
|
+
const gr = () => {
|
|
287
|
+
ke(!0), Xe && z(), !t && !b && X && (H(), L.current = requestAnimationFrame(() => {
|
|
284
288
|
var e;
|
|
285
|
-
L.current = null, (e =
|
|
289
|
+
L.current = null, (e = w.current) == null || e.select();
|
|
286
290
|
}));
|
|
287
|
-
},
|
|
291
|
+
}, Re = (e) => {
|
|
288
292
|
var a;
|
|
289
293
|
const r = e.relatedTarget;
|
|
290
|
-
r && ((a =
|
|
291
|
-
},
|
|
294
|
+
r && ((a = oe.current) != null && a.contains(r)) || (H(), ke(!1));
|
|
295
|
+
}, _r = (e) => {
|
|
292
296
|
if (!_)
|
|
293
|
-
switch (
|
|
297
|
+
switch (H(), e.key) {
|
|
294
298
|
case "ArrowDown":
|
|
295
|
-
e.preventDefault(), c ?
|
|
299
|
+
e.preventDefault(), c ? Ve(1) : z();
|
|
296
300
|
break;
|
|
297
301
|
case "ArrowUp":
|
|
298
302
|
if (e.preventDefault(), c)
|
|
299
|
-
|
|
303
|
+
Ve(-1);
|
|
300
304
|
else {
|
|
301
305
|
for (let r = s.length - 1; r >= 0; r--)
|
|
302
|
-
if (!
|
|
306
|
+
if (!Y(s[r])) {
|
|
303
307
|
y(r);
|
|
304
308
|
break;
|
|
305
309
|
}
|
|
306
|
-
|
|
310
|
+
z();
|
|
307
311
|
}
|
|
308
312
|
break;
|
|
309
313
|
case "Home":
|
|
310
314
|
c && s.length > 0 && (e.preventDefault(), y(
|
|
311
315
|
Math.max(
|
|
312
316
|
0,
|
|
313
|
-
s.findIndex((r) => !
|
|
317
|
+
s.findIndex((r) => !Y(r))
|
|
314
318
|
)
|
|
315
319
|
));
|
|
316
320
|
break;
|
|
@@ -318,7 +322,7 @@ const pn = Mr(function({
|
|
|
318
322
|
if (c && s.length > 0) {
|
|
319
323
|
e.preventDefault();
|
|
320
324
|
for (let r = s.length - 1; r >= 0; r--)
|
|
321
|
-
if (!
|
|
325
|
+
if (!Y(s[r])) {
|
|
322
326
|
y(r);
|
|
323
327
|
break;
|
|
324
328
|
}
|
|
@@ -326,32 +330,32 @@ const pn = Mr(function({
|
|
|
326
330
|
break;
|
|
327
331
|
case "Enter":
|
|
328
332
|
if (e.nativeEvent.isComposing || e.keyCode === 229) break;
|
|
329
|
-
(c || !
|
|
333
|
+
(c || !Ze) && (e.preventDefault(), e.stopPropagation()), c && x >= 0 && s[x] && hr(s[x]);
|
|
330
334
|
break;
|
|
331
335
|
case "Escape":
|
|
332
336
|
c && (e.preventDefault(), e.stopPropagation(), p());
|
|
333
337
|
break;
|
|
334
338
|
case "Backspace":
|
|
335
|
-
t &&
|
|
339
|
+
t && ce === "" && i.length > 0 && (e.preventDefault(), Ee(i[i.length - 1]));
|
|
336
340
|
break;
|
|
337
341
|
case "Tab":
|
|
338
342
|
p();
|
|
339
343
|
break;
|
|
340
344
|
}
|
|
341
|
-
},
|
|
342
|
-
|
|
343
|
-
},
|
|
344
|
-
|
|
345
|
-
},
|
|
346
|
-
|
|
347
|
-
},
|
|
345
|
+
}, yr = (e) => {
|
|
346
|
+
gr(), ne == null || ne(e);
|
|
347
|
+
}, pr = (e) => {
|
|
348
|
+
Re(e), te == null || te(e);
|
|
349
|
+
}, kr = (e) => {
|
|
350
|
+
_r(e), ae == null || ae(e);
|
|
351
|
+
}, Ar = (e) => {
|
|
348
352
|
var r;
|
|
349
|
-
_ || e.target.closest("[data-chip], [data-combobox-clear]") || (e.target !==
|
|
350
|
-
},
|
|
353
|
+
_ || e.target.closest("[data-chip], [data-combobox-clear]") || (e.target !== w.current && (e.preventDefault(), (r = w.current) == null || r.focus()), c || z());
|
|
354
|
+
}, wr = (e) => {
|
|
351
355
|
e.target.closest(
|
|
352
356
|
'input, textarea, select, [contenteditable="true"]'
|
|
353
357
|
) || e.preventDefault();
|
|
354
|
-
},
|
|
358
|
+
}, Se = t ? i.length > 0 : h != null && h !== "", Dr = ce.length > 0, Nr = Qe && !t && Se && !_, Mr = cr || c || Se || Dr, Fe = x >= 0 ? s[x] : void 0, Ir = Fe != null ? N(Fe) : void 0, Z = E(() => {
|
|
355
359
|
if (!t) return [];
|
|
356
360
|
if (A == null) {
|
|
357
361
|
const e = v.filter((a) => i.includes(a.value));
|
|
@@ -362,45 +366,45 @@ const pn = Mr(function({
|
|
|
362
366
|
...i.filter((a) => !r.has(a)).map((a) => ({ value: a, label: a }))
|
|
363
367
|
];
|
|
364
368
|
}
|
|
365
|
-
return i.map(
|
|
369
|
+
return i.map(Q).filter((e) => e != null);
|
|
366
370
|
}, [
|
|
367
371
|
t,
|
|
368
372
|
A,
|
|
369
373
|
v,
|
|
370
374
|
i,
|
|
371
375
|
V,
|
|
372
|
-
|
|
373
|
-
]),
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
c ?
|
|
381
|
-
_ ?
|
|
382
|
-
|
|
376
|
+
Q
|
|
377
|
+
]), Er = l[`combobox--size-${en(B)}`], Vr = t && Z.length > 0, Le = Ur(Ue, ee, xe), Te = jr(ee), Ce = Te ? `${q}-message` : void 0, Rr = [
|
|
378
|
+
l.combobox,
|
|
379
|
+
Er,
|
|
380
|
+
Le ? l["combobox--invalid"] : "",
|
|
381
|
+
D != null && Mr ? l["combobox--label-floated"] : "",
|
|
382
|
+
P != null ? l["combobox--has-leading-icon"] : "",
|
|
383
|
+
Vr ? l["combobox--has-chips"] : "",
|
|
384
|
+
c ? l["combobox--open"] : "",
|
|
385
|
+
_ ? l["combobox--disabled"] : "",
|
|
386
|
+
Pe
|
|
383
387
|
].filter(Boolean).join(" ");
|
|
384
|
-
return /* @__PURE__ */ M("div", { className:
|
|
385
|
-
/* @__PURE__ */ M("div", { className:
|
|
386
|
-
|
|
388
|
+
return /* @__PURE__ */ M("div", { className: Rr, ref: oe, children: [
|
|
389
|
+
/* @__PURE__ */ M("div", { className: l.combobox__wrapper, ref: ye, children: [
|
|
390
|
+
D != null && /* @__PURE__ */ o("label", { className: l.combobox__label, htmlFor: q, children: D }),
|
|
387
391
|
/* @__PURE__ */ M(
|
|
388
392
|
"div",
|
|
389
393
|
{
|
|
390
|
-
className:
|
|
391
|
-
onMouseDown:
|
|
394
|
+
className: l.combobox__inner,
|
|
395
|
+
onMouseDown: Ar,
|
|
392
396
|
children: [
|
|
393
|
-
|
|
394
|
-
/* @__PURE__ */ M("div", { className:
|
|
395
|
-
t &&
|
|
396
|
-
|
|
397
|
+
P != null && /* @__PURE__ */ o("span", { className: l["combobox__leading-icon"], "aria-hidden": !0, children: /* @__PURE__ */ o(Hr.Provider, { value: { size: "16" }, children: P }) }),
|
|
398
|
+
/* @__PURE__ */ M("div", { className: l.combobox__value, children: [
|
|
399
|
+
t && Z.length > 0 && /* @__PURE__ */ o(
|
|
400
|
+
zr,
|
|
397
401
|
{
|
|
398
|
-
"aria-label":
|
|
402
|
+
"aria-label": Ye ?? tn(D),
|
|
399
403
|
disabled: _,
|
|
400
|
-
children:
|
|
401
|
-
|
|
404
|
+
children: Z.map((e) => /* @__PURE__ */ o(
|
|
405
|
+
$r,
|
|
402
406
|
{
|
|
403
|
-
size:
|
|
407
|
+
size: rn[B],
|
|
404
408
|
leadingAvatar: e.leadingAvatar,
|
|
405
409
|
leadingIcon: e.leadingAvatar == null ? e.leadingVisual : void 0,
|
|
406
410
|
onRemove: _ ? void 0 : (r) => {
|
|
@@ -412,135 +416,148 @@ const pn = Mr(function({
|
|
|
412
416
|
))
|
|
413
417
|
}
|
|
414
418
|
),
|
|
415
|
-
/* @__PURE__ */
|
|
419
|
+
/* @__PURE__ */ o(
|
|
416
420
|
"input",
|
|
417
421
|
{
|
|
418
|
-
...
|
|
419
|
-
ref:
|
|
420
|
-
id:
|
|
421
|
-
className:
|
|
422
|
+
...ar,
|
|
423
|
+
ref: lr,
|
|
424
|
+
id: q,
|
|
425
|
+
className: l.combobox__control,
|
|
422
426
|
type: "text",
|
|
423
427
|
role: "combobox",
|
|
424
428
|
autoComplete: "off",
|
|
425
429
|
spellCheck: !1,
|
|
426
430
|
disabled: _,
|
|
427
|
-
placeholder: t &&
|
|
428
|
-
value:
|
|
429
|
-
"aria-label":
|
|
430
|
-
"aria-describedby":
|
|
431
|
-
|
|
432
|
-
|
|
431
|
+
placeholder: t && Z.length > 0 ? void 0 : je,
|
|
432
|
+
value: ce,
|
|
433
|
+
"aria-label": _e,
|
|
434
|
+
"aria-describedby": Or(
|
|
435
|
+
er,
|
|
436
|
+
Ce,
|
|
437
|
+
void 0
|
|
438
|
+
),
|
|
439
|
+
"aria-required": rr ? !0 : void 0,
|
|
440
|
+
"aria-invalid": Le ? !0 : void 0,
|
|
433
441
|
"aria-expanded": c,
|
|
434
442
|
"aria-controls": S,
|
|
435
443
|
"aria-autocomplete": "list",
|
|
436
|
-
"aria-activedescendant":
|
|
437
|
-
"aria-busy":
|
|
438
|
-
onChange:
|
|
439
|
-
onFocus:
|
|
440
|
-
onBlur:
|
|
441
|
-
onKeyDown:
|
|
444
|
+
"aria-activedescendant": Ir,
|
|
445
|
+
"aria-busy": ge || void 0,
|
|
446
|
+
onChange: xr,
|
|
447
|
+
onFocus: yr,
|
|
448
|
+
onBlur: pr,
|
|
449
|
+
onKeyDown: kr
|
|
442
450
|
}
|
|
443
451
|
)
|
|
444
452
|
] }),
|
|
445
|
-
|
|
453
|
+
Nr && /* @__PURE__ */ o(
|
|
446
454
|
"button",
|
|
447
455
|
{
|
|
448
456
|
...m,
|
|
449
457
|
type: "button",
|
|
450
|
-
className:
|
|
451
|
-
|
|
458
|
+
className: Br(
|
|
459
|
+
l.combobox__clear,
|
|
452
460
|
m == null ? void 0 : m.className
|
|
453
461
|
),
|
|
454
|
-
"aria-label":
|
|
462
|
+
"aria-label": We,
|
|
455
463
|
"data-combobox-clear": "",
|
|
456
|
-
onClick:
|
|
464
|
+
onClick: Ie,
|
|
457
465
|
onKeyDown: (e) => {
|
|
458
466
|
var r;
|
|
459
|
-
e.key === "Enter" && (e.preventDefault(), e.stopPropagation(),
|
|
467
|
+
e.key === "Enter" && (e.preventDefault(), e.stopPropagation(), Ie()), (r = m == null ? void 0 : m.onKeyDown) == null || r.call(m, e);
|
|
460
468
|
},
|
|
461
469
|
onBlur: (e) => {
|
|
462
470
|
var r;
|
|
463
|
-
(r = m == null ? void 0 : m.onBlur) == null || r.call(m, e),
|
|
471
|
+
(r = m == null ? void 0 : m.onBlur) == null || r.call(m, e), Re(e);
|
|
464
472
|
},
|
|
465
|
-
children: /* @__PURE__ */
|
|
473
|
+
children: /* @__PURE__ */ o(be, { size: nn[B], glyph: /* @__PURE__ */ o(Tr, {}) })
|
|
466
474
|
}
|
|
467
475
|
),
|
|
468
|
-
/* @__PURE__ */
|
|
476
|
+
/* @__PURE__ */ o("span", { className: l["combobox__trailing-icon"], "aria-hidden": !0, children: /* @__PURE__ */ o(be, { size: "12", glyph: /* @__PURE__ */ o(Lr, {}) }) })
|
|
469
477
|
]
|
|
470
478
|
}
|
|
471
479
|
)
|
|
472
480
|
] }),
|
|
473
|
-
|
|
481
|
+
Te && /* @__PURE__ */ o(
|
|
482
|
+
qr,
|
|
483
|
+
{
|
|
484
|
+
id: Ce,
|
|
485
|
+
className: l.combobox__message,
|
|
486
|
+
message: ee,
|
|
487
|
+
tone: xe ?? "error"
|
|
488
|
+
}
|
|
489
|
+
),
|
|
490
|
+
Ne && br(
|
|
474
491
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions -- keeps focus on the input for presses anywhere in the menu
|
|
475
|
-
/* @__PURE__ */
|
|
492
|
+
/* @__PURE__ */ o(
|
|
476
493
|
"div",
|
|
477
494
|
{
|
|
478
|
-
ref:
|
|
495
|
+
ref: Me,
|
|
479
496
|
className: [
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
497
|
+
l.combobox__popup,
|
|
498
|
+
fr === "above" ? l["combobox__popup--above"] : "",
|
|
499
|
+
ur ? l["combobox__popup--visible"] : ""
|
|
483
500
|
].filter(Boolean).join(" "),
|
|
484
|
-
style:
|
|
485
|
-
onMouseDown:
|
|
486
|
-
children: /* @__PURE__ */
|
|
487
|
-
s.length > 0 && /* @__PURE__ */
|
|
501
|
+
style: mr,
|
|
502
|
+
onMouseDown: wr,
|
|
503
|
+
children: /* @__PURE__ */ o(Gr, { className: l.combobox__menu, children: /* @__PURE__ */ M(Kr, { maxHeight: dr, children: [
|
|
504
|
+
s.length > 0 && /* @__PURE__ */ o(
|
|
488
505
|
"ul",
|
|
489
506
|
{
|
|
490
507
|
id: S,
|
|
491
|
-
className:
|
|
508
|
+
className: l.combobox__list,
|
|
492
509
|
role: "listbox",
|
|
493
510
|
"aria-multiselectable": t || void 0,
|
|
494
|
-
"aria-label": typeof
|
|
511
|
+
"aria-label": typeof D == "string" ? D : _e ?? Je,
|
|
495
512
|
children: s.map((e, r) => {
|
|
496
513
|
const a = r === x;
|
|
497
514
|
if (e.kind === "create")
|
|
498
|
-
return /* @__PURE__ */
|
|
515
|
+
return /* @__PURE__ */ o(
|
|
499
516
|
"li",
|
|
500
517
|
{
|
|
501
|
-
className:
|
|
518
|
+
className: l.combobox__option,
|
|
502
519
|
role: "presentation",
|
|
503
|
-
children: /* @__PURE__ */
|
|
504
|
-
|
|
520
|
+
children: /* @__PURE__ */ o(
|
|
521
|
+
$e,
|
|
505
522
|
{
|
|
506
|
-
id:
|
|
523
|
+
id: N(e),
|
|
507
524
|
role: "option",
|
|
508
|
-
label:
|
|
509
|
-
leadingVisual: /* @__PURE__ */
|
|
525
|
+
label: Ke(e.inputValue),
|
|
526
|
+
leadingVisual: /* @__PURE__ */ o(be, { glyph: /* @__PURE__ */ o(Cr, {}) }),
|
|
510
527
|
active: a,
|
|
511
528
|
"aria-selected": !1,
|
|
512
|
-
onMouseEnter: () =>
|
|
513
|
-
onClick: () =>
|
|
529
|
+
onMouseEnter: () => Ae(r),
|
|
530
|
+
onClick: () => de(e.inputValue)
|
|
514
531
|
}
|
|
515
532
|
)
|
|
516
533
|
},
|
|
517
|
-
|
|
534
|
+
N(e)
|
|
518
535
|
);
|
|
519
|
-
const { option: f } = e, k =
|
|
520
|
-
return /* @__PURE__ */
|
|
536
|
+
const { option: f } = e, k = vr(f.value), W = cn(f);
|
|
537
|
+
return /* @__PURE__ */ o(
|
|
521
538
|
"li",
|
|
522
539
|
{
|
|
523
|
-
className:
|
|
540
|
+
className: l.combobox__option,
|
|
524
541
|
role: "presentation",
|
|
525
|
-
children: /* @__PURE__ */
|
|
526
|
-
|
|
542
|
+
children: /* @__PURE__ */ o(
|
|
543
|
+
$e,
|
|
527
544
|
{
|
|
528
|
-
...
|
|
529
|
-
|
|
545
|
+
...Pr(
|
|
546
|
+
He,
|
|
530
547
|
f.menuItemProps
|
|
531
548
|
),
|
|
532
|
-
id:
|
|
549
|
+
id: N(e),
|
|
533
550
|
role: "option",
|
|
534
551
|
label: f.label,
|
|
535
552
|
secondaryLabel: f.secondaryLabel,
|
|
536
|
-
leadingElement:
|
|
537
|
-
leadingVisual:
|
|
553
|
+
leadingElement: W != null,
|
|
554
|
+
leadingVisual: W,
|
|
538
555
|
trailingElement: k,
|
|
539
556
|
active: a,
|
|
540
557
|
disabled: f.disabled,
|
|
541
558
|
"aria-selected": k,
|
|
542
|
-
onMouseEnter: () =>
|
|
543
|
-
onClick: () =>
|
|
559
|
+
onMouseEnter: () => Ae(r),
|
|
560
|
+
onClick: () => fe(f)
|
|
544
561
|
}
|
|
545
562
|
)
|
|
546
563
|
},
|
|
@@ -549,10 +566,10 @@ const pn = Mr(function({
|
|
|
549
566
|
})
|
|
550
567
|
}
|
|
551
568
|
),
|
|
552
|
-
|
|
553
|
-
/* @__PURE__ */
|
|
554
|
-
/* @__PURE__ */
|
|
555
|
-
] }) : s.length === 0 && /* @__PURE__ */
|
|
569
|
+
ge ? /* @__PURE__ */ M("div", { className: l.combobox__loading, role: "status", children: [
|
|
570
|
+
/* @__PURE__ */ o(Qr, { size: "16", "aria-hidden": !0 }),
|
|
571
|
+
/* @__PURE__ */ o("span", { children: Ge })
|
|
572
|
+
] }) : s.length === 0 && /* @__PURE__ */ o("p", { className: l.combobox__empty, children: qe })
|
|
556
573
|
] }) })
|
|
557
574
|
}
|
|
558
575
|
)
|
|
@@ -560,6 +577,6 @@ const pn = Mr(function({
|
|
|
560
577
|
] });
|
|
561
578
|
});
|
|
562
579
|
export {
|
|
563
|
-
|
|
580
|
+
Sn as default
|
|
564
581
|
};
|
|
565
582
|
//# sourceMappingURL=Combobox.js.map
|