@rocket.chat/fuselage 0.95.0 → 1.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +140 -83
- package/dist/Theme.d.ts.map +1 -1
- package/dist/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/Accordion/AccordionItem.d.ts.map +1 -1
- package/dist/components/Accordion/index.d.ts +1 -1
- package/dist/components/Accordion/index.d.ts.map +1 -1
- package/dist/components/AnimatedVisibility/AnimatedVisibility.d.ts +7 -7
- package/dist/components/AnimatedVisibility/AnimatedVisibility.d.ts.map +1 -1
- package/dist/components/AnimatedVisibility/index.d.ts +1 -1
- package/dist/components/AnimatedVisibility/index.d.ts.map +1 -1
- package/dist/components/AudioPlayer/AudioPlayer.d.ts.map +1 -1
- package/dist/components/AudioPlayer/AudioPlayerControls.d.ts.map +1 -1
- package/dist/components/AudioPlayer/index.d.ts +1 -1
- package/dist/components/AudioPlayer/index.d.ts.map +1 -1
- package/dist/components/AutoComplete/AutoComplete.d.ts.map +1 -1
- package/dist/components/AutoComplete/index.d.ts +1 -1
- package/dist/components/AutoComplete/index.d.ts.map +1 -1
- package/dist/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/Avatar/AvatarContainer.d.ts.map +1 -1
- package/dist/components/Avatar/AvatarStack.d.ts.map +1 -1
- package/dist/components/Avatar/index.d.ts +1 -1
- package/dist/components/Avatar/index.d.ts.map +1 -1
- package/dist/components/Badge/Badge.d.ts.map +1 -1
- package/dist/components/Banner/Banner.d.ts.map +1 -1
- package/dist/components/Banner/index.d.ts +1 -1
- package/dist/components/Banner/index.d.ts.map +1 -1
- package/dist/components/Box/Box.d.ts +1 -1
- package/dist/components/Box/Box.d.ts.map +1 -1
- package/dist/components/Box/BoxTransforms.d.ts.map +1 -1
- package/dist/components/Box/StylingBox.d.ts +1 -1
- package/dist/components/Box/StylingBox.d.ts.map +1 -1
- package/dist/components/Box/stylingProps.d.ts.map +1 -1
- package/dist/components/Box/useStylingProps.d.ts.map +1 -1
- package/dist/components/Box/withBoxStyling.d.ts.map +1 -1
- package/dist/components/Bubble/Bubble.d.ts.map +1 -1
- package/dist/components/Bubble/BubbleButton.d.ts.map +1 -1
- package/dist/components/Bubble/BubbleItem.d.ts.map +1 -1
- package/dist/components/Button/Button.d.ts +9 -5
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/IconButton.d.ts +25 -4
- package/dist/components/Button/IconButton.d.ts.map +1 -1
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +2 -1
- package/dist/components/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/dist/components/Callout/Callout.d.ts +2 -2
- package/dist/components/Callout/Callout.d.ts.map +1 -1
- package/dist/components/Card/Card.d.ts.map +1 -1
- package/dist/components/Card/CardBody.d.ts +3 -2
- package/dist/components/Card/CardBody.d.ts.map +1 -1
- package/dist/components/Card/CardCol.d.ts.map +1 -1
- package/dist/components/Card/CardControls.d.ts.map +1 -1
- package/dist/components/Card/CardHeader.d.ts.map +1 -1
- package/dist/components/Card/CardRow.d.ts.map +1 -1
- package/dist/components/Card/CardTitle.d.ts.map +1 -1
- package/dist/components/Card/index.d.ts +1 -1
- package/dist/components/Card/index.d.ts.map +1 -1
- package/dist/components/CardGrid/CardGrid.d.ts +3 -1
- package/dist/components/CardGrid/CardGrid.d.ts.map +1 -1
- package/dist/components/CardGrid/CardGridItem.d.ts +11 -0
- package/dist/components/CardGrid/CardGridItem.d.ts.map +1 -0
- package/dist/components/CardGrid/index.d.ts +1 -0
- package/dist/components/CardGrid/index.d.ts.map +1 -1
- package/dist/components/CardGroup/CardGroup.d.ts.map +1 -1
- package/dist/components/CheckBox/CheckBox.d.ts +4 -4
- package/dist/components/CheckBox/CheckBox.d.ts.map +1 -1
- package/dist/components/Chevron/Chevron.d.ts +2 -1
- package/dist/components/Chevron/Chevron.d.ts.map +1 -1
- package/dist/components/Chip/Chip.d.ts +9 -1
- package/dist/components/Chip/Chip.d.ts.map +1 -1
- package/dist/components/CodeSnippet/CodeSnippet.d.ts +2 -2
- package/dist/components/CodeSnippet/CodeSnippet.d.ts.map +1 -1
- package/dist/components/Contextualbar/Contextualbar.d.ts +8 -4
- package/dist/components/Contextualbar/Contextualbar.d.ts.map +1 -1
- package/dist/components/Contextualbar/ContextualbarAction.d.ts +2 -1
- package/dist/components/Contextualbar/ContextualbarAction.d.ts.map +1 -1
- package/dist/components/Contextualbar/ContextualbarActions.d.ts +2 -1
- package/dist/components/Contextualbar/ContextualbarActions.d.ts.map +1 -1
- package/dist/components/Contextualbar/ContextualbarButton.d.ts +2 -1
- package/dist/components/Contextualbar/ContextualbarButton.d.ts.map +1 -1
- package/dist/components/Contextualbar/ContextualbarContent.d.ts +8 -4
- package/dist/components/Contextualbar/ContextualbarContent.d.ts.map +1 -1
- package/dist/components/Contextualbar/ContextualbarEmptyContent.d.ts.map +1 -1
- package/dist/components/Contextualbar/ContextualbarFooter.d.ts +2 -3
- package/dist/components/Contextualbar/ContextualbarFooter.d.ts.map +1 -1
- package/dist/components/Contextualbar/ContextualbarHeader.d.ts +4 -3
- package/dist/components/Contextualbar/ContextualbarHeader.d.ts.map +1 -1
- package/dist/components/Contextualbar/ContextualbarIcon.d.ts +2 -1
- package/dist/components/Contextualbar/ContextualbarIcon.d.ts.map +1 -1
- package/dist/components/Contextualbar/ContextualbarSection.d.ts +2 -3
- package/dist/components/Contextualbar/ContextualbarSection.d.ts.map +1 -1
- package/dist/components/Contextualbar/ContextualbarSkeleton.d.ts +4 -3
- package/dist/components/Contextualbar/ContextualbarSkeleton.d.ts.map +1 -1
- package/dist/components/Contextualbar/ContextualbarTitle.d.ts +4 -3
- package/dist/components/Contextualbar/ContextualbarTitle.d.ts.map +1 -1
- package/dist/components/Contextualbar/index.d.ts +12 -12
- package/dist/components/Contextualbar/index.d.ts.map +1 -1
- package/dist/components/Divider/Divider.d.ts +10 -4
- package/dist/components/Divider/Divider.d.ts.map +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/components/Dropdown/DropdownDesktop.d.ts +2 -3
- package/dist/components/Dropdown/DropdownDesktop.d.ts.map +1 -1
- package/dist/components/Dropdown/DropdownDesktopWrapper.d.ts.map +1 -1
- package/dist/components/Dropdown/DropdownMobile.d.ts.map +1 -1
- package/dist/components/EmailInput/EmailInput.d.ts.map +1 -1
- package/dist/components/Field/Field.d.ts +2 -2
- package/dist/components/Field/Field.d.ts.map +1 -1
- package/dist/components/Field/FieldDescription.d.ts +2 -2
- package/dist/components/Field/FieldDescription.d.ts.map +1 -1
- package/dist/components/Field/FieldError.d.ts +2 -2
- package/dist/components/Field/FieldError.d.ts.map +1 -1
- package/dist/components/Field/FieldHint.d.ts +2 -2
- package/dist/components/Field/FieldHint.d.ts.map +1 -1
- package/dist/components/Field/FieldLabel.d.ts +1 -1
- package/dist/components/Field/FieldLabel.d.ts.map +1 -1
- package/dist/components/Field/FieldLabelInfo.d.ts.map +1 -1
- package/dist/components/Field/FieldLink.d.ts +3 -2
- package/dist/components/Field/FieldLink.d.ts.map +1 -1
- package/dist/components/Field/FieldRow.d.ts +6 -3
- package/dist/components/Field/FieldRow.d.ts.map +1 -1
- package/dist/components/Field/index.d.ts +2 -2
- package/dist/components/Field/index.d.ts.map +1 -1
- package/dist/components/FieldGroup/FieldGroup.d.ts +3 -2
- package/dist/components/FieldGroup/FieldGroup.d.ts.map +1 -1
- package/dist/components/Flex/FlexContainer.d.ts +1 -1
- package/dist/components/Flex/FlexContainer.d.ts.map +1 -1
- package/dist/components/Flex/FlexItem.d.ts +1 -1
- package/dist/components/Flex/FlexItem.d.ts.map +1 -1
- package/dist/components/Flex/index.d.ts +1 -1
- package/dist/components/Flex/index.d.ts.map +1 -1
- package/dist/components/FramedIcon/FramedIcon.d.ts +2 -2
- package/dist/components/FramedIcon/FramedIcon.d.ts.map +1 -1
- package/dist/components/Grid/Grid.d.ts +7 -6
- package/dist/components/Grid/Grid.d.ts.map +1 -1
- package/dist/components/Grid/GridItem.d.ts +2 -2
- package/dist/components/Grid/GridItem.d.ts.map +1 -1
- package/dist/components/Icon/Icon.d.ts +8 -2
- package/dist/components/Icon/Icon.d.ts.map +1 -1
- package/dist/components/Icon/index.d.ts +1 -1
- package/dist/components/Icon/index.d.ts.map +1 -1
- package/dist/components/InputBox/Input.d.ts +7 -3
- package/dist/components/InputBox/Input.d.ts.map +1 -1
- package/dist/components/InputBox/InputBox.d.ts +7 -4
- package/dist/components/InputBox/InputBox.d.ts.map +1 -1
- package/dist/components/InputBox/InputBoxAddon.d.ts +2 -3
- package/dist/components/InputBox/InputBoxAddon.d.ts.map +1 -1
- package/dist/components/InputBox/InputBoxSkeleton.d.ts +2 -2
- package/dist/components/InputBox/InputBoxSkeleton.d.ts.map +1 -1
- package/dist/components/InputBox/InputBoxWrapper.d.ts +5 -2
- package/dist/components/InputBox/InputBoxWrapper.d.ts.map +1 -1
- package/dist/components/InputBox/index.d.ts +1 -1
- package/dist/components/InputBox/index.d.ts.map +1 -1
- package/dist/components/Item/Item.d.ts +37 -0
- package/dist/components/Item/Item.d.ts.map +1 -0
- package/dist/components/Item/ItemActions.d.ts +16 -0
- package/dist/components/Item/ItemActions.d.ts.map +1 -0
- package/dist/components/Item/ItemContent.d.ts +10 -0
- package/dist/components/Item/ItemContent.d.ts.map +1 -0
- package/dist/components/Item/ItemContext.d.ts +8 -0
- package/dist/components/Item/ItemContext.d.ts.map +1 -0
- package/dist/components/Item/ItemDescription.d.ts +15 -0
- package/dist/components/Item/ItemDescription.d.ts.map +1 -0
- package/dist/components/Item/ItemDivider.d.ts +19 -0
- package/dist/components/Item/ItemDivider.d.ts.map +1 -0
- package/dist/components/Item/ItemGroup.d.ts +13 -0
- package/dist/components/Item/ItemGroup.d.ts.map +1 -0
- package/dist/components/Item/ItemGroupContext.d.ts +6 -0
- package/dist/components/Item/ItemGroupContext.d.ts.map +1 -0
- package/dist/components/Item/ItemGroupHeader.d.ts +24 -0
- package/dist/components/Item/ItemGroupHeader.d.ts.map +1 -0
- package/dist/components/Item/ItemGroupTitle.d.ts +13 -0
- package/dist/components/Item/ItemGroupTitle.d.ts.map +1 -0
- package/dist/components/Item/ItemIcon.d.ts +15 -0
- package/dist/components/Item/ItemIcon.d.ts.map +1 -0
- package/dist/components/Item/ItemLink.d.ts +15 -0
- package/dist/components/Item/ItemLink.d.ts.map +1 -0
- package/dist/components/Item/ItemMedia.d.ts +14 -0
- package/dist/components/Item/ItemMedia.d.ts.map +1 -0
- package/dist/components/Item/ItemMeta.d.ts +14 -0
- package/dist/components/Item/ItemMeta.d.ts.map +1 -0
- package/dist/components/Item/ItemRow.d.ts +10 -0
- package/dist/components/Item/ItemRow.d.ts.map +1 -0
- package/dist/components/Item/ItemSkeleton.d.ts +18 -0
- package/dist/components/Item/ItemSkeleton.d.ts.map +1 -0
- package/dist/components/Item/ItemTitle.d.ts +10 -0
- package/dist/components/Item/ItemTitle.d.ts.map +1 -0
- package/dist/components/Item/index.d.ts +17 -0
- package/dist/components/Item/index.d.ts.map +1 -0
- package/dist/components/Item/types.d.ts +2 -0
- package/dist/components/Item/types.d.ts.map +1 -0
- package/dist/components/Item/useIdRegistry.d.ts +6 -0
- package/dist/components/Item/useIdRegistry.d.ts.map +1 -0
- package/dist/components/Label/Label.d.ts +5 -3
- package/dist/components/Label/Label.d.ts.map +1 -1
- package/dist/components/Label/LabelInfo.d.ts.map +1 -1
- package/dist/components/Listbox/Listbox.d.ts +12 -0
- package/dist/components/Listbox/Listbox.d.ts.map +1 -0
- package/dist/components/Listbox/ListboxOption.d.ts +23 -0
- package/dist/components/Listbox/ListboxOption.d.ts.map +1 -0
- package/dist/components/Listbox/index.d.ts +3 -0
- package/dist/components/Listbox/index.d.ts.map +1 -0
- package/dist/components/Margins/Margins.d.ts.map +1 -1
- package/dist/components/Menu/Menu.d.ts +8 -2
- package/dist/components/Menu/Menu.d.ts.map +1 -1
- package/dist/components/Menu/MenuDropdown.d.ts.map +1 -1
- package/dist/components/Menu/MenuItem.d.ts +3 -0
- package/dist/components/Menu/MenuItem.d.ts.map +1 -1
- package/dist/components/Menu/MenuOption.d.ts +3 -4
- package/dist/components/Menu/MenuOption.d.ts.map +1 -1
- package/dist/components/Menu/MenuPopover.d.ts.map +1 -1
- package/dist/components/Menu/MenuPortalContext.d.ts.map +1 -1
- package/dist/components/Menu/MenuSection.d.ts +1 -1
- package/dist/components/Menu/MenuSection.d.ts.map +1 -1
- package/dist/components/Menu/MenuSubmenu.d.ts +1 -1
- package/dist/components/Menu/MenuSubmenu.d.ts.map +1 -1
- package/dist/components/Menu/helpers/helpers.d.ts +1 -1
- package/dist/components/Menu/helpers/helpers.d.ts.map +1 -1
- package/dist/components/Menu/index.d.ts +2 -2
- package/dist/components/Menu/index.d.ts.map +1 -1
- package/dist/components/Menu/stately/MenuItem.d.ts.map +1 -1
- package/dist/components/Menu/stately/MenuSection.d.ts.map +1 -1
- package/dist/components/Menu/stately/MenuSubmenuTrigger.d.ts.map +1 -1
- package/dist/components/Menu/stately/PartialNode.d.ts.map +1 -1
- package/dist/components/Message/Message.d.ts.map +1 -1
- package/dist/components/Message/MessageBlock.d.ts +2 -3
- package/dist/components/Message/MessageBlock.d.ts.map +1 -1
- package/dist/components/Message/MessageBody.d.ts.map +1 -1
- package/dist/components/Message/MessageContainer.d.ts.map +1 -1
- package/dist/components/Message/MessageContainerFixed.d.ts.map +1 -1
- package/dist/components/Message/MessageDivider/MessageDivider.d.ts.map +1 -1
- package/dist/components/Message/MessageDivider/index.d.ts +1 -1
- package/dist/components/Message/MessageDivider/index.d.ts.map +1 -1
- package/dist/components/Message/MessageEmoji.d.ts.map +1 -1
- package/dist/components/Message/MessageEmojiBase.d.ts.map +1 -1
- package/dist/components/Message/MessageGenericPreview/MessageGenericPreview.d.ts.map +1 -1
- package/dist/components/Message/MessageGenericPreview/MessageGenericPreviewContent.d.ts.map +1 -1
- package/dist/components/Message/MessageGenericPreview/MessageGenericPreviewCoverImage.d.ts.map +1 -1
- package/dist/components/Message/MessageGenericPreview/MessageGenericPreviewDescription.d.ts +1 -1
- package/dist/components/Message/MessageGenericPreview/MessageGenericPreviewDescription.d.ts.map +1 -1
- package/dist/components/Message/MessageGenericPreview/MessageGenericPreviewFooter.d.ts +1 -1
- package/dist/components/Message/MessageGenericPreview/MessageGenericPreviewFooter.d.ts.map +1 -1
- package/dist/components/Message/MessageGenericPreview/MessageGenericPreviewIcon.d.ts +2 -2
- package/dist/components/Message/MessageGenericPreview/MessageGenericPreviewIcon.d.ts.map +1 -1
- package/dist/components/Message/MessageGenericPreview/MessageGenericPreviewImage.d.ts.map +1 -1
- package/dist/components/Message/MessageGenericPreview/MessageGenericPreviewThumb.d.ts.map +1 -1
- package/dist/components/Message/MessageGenericPreview/MessageGenericPreviewTitle.d.ts.map +1 -1
- package/dist/components/Message/MessageGenericPreview/index.d.ts +8 -8
- package/dist/components/Message/MessageGenericPreview/index.d.ts.map +1 -1
- package/dist/components/Message/MessageHeader.d.ts.map +1 -1
- package/dist/components/Message/MessageHighlight.d.ts.map +1 -1
- package/dist/components/Message/MessageLeftContainer.d.ts.map +1 -1
- package/dist/components/Message/MessageMetrics/MessageMetrics.d.ts.map +1 -1
- package/dist/components/Message/MessageMetrics/MessageMetricsContentItem.d.ts.map +1 -1
- package/dist/components/Message/MessageMetrics/MessageMetricsFollowing.d.ts +1 -1
- package/dist/components/Message/MessageMetrics/MessageMetricsFollowing.d.ts.map +1 -1
- package/dist/components/Message/MessageMetrics/MessageMetricsItem/MessageMetricsItem.d.ts.map +1 -1
- package/dist/components/Message/MessageMetrics/MessageMetricsItem/MessageMetricsItemAvatarRow.d.ts.map +1 -1
- package/dist/components/Message/MessageMetrics/MessageMetricsItem/MessageMetricsItemAvatarRowContent.d.ts.map +1 -1
- package/dist/components/Message/MessageMetrics/MessageMetricsItem/MessageMetricsItemIcon.d.ts.map +1 -1
- package/dist/components/Message/MessageMetrics/MessageMetricsItem/MessageMetricsItemLabel.d.ts.map +1 -1
- package/dist/components/Message/MessageMetrics/MessageMetricsItem/index.d.ts +3 -3
- package/dist/components/Message/MessageMetrics/MessageMetricsItem/index.d.ts.map +1 -1
- package/dist/components/Message/MessageMetrics/MessageMetricsReply.d.ts.map +1 -1
- package/dist/components/Message/MessageMetrics/index.d.ts +3 -3
- package/dist/components/Message/MessageMetrics/index.d.ts.map +1 -1
- package/dist/components/Message/MessageName.d.ts.map +1 -1
- package/dist/components/Message/MessageNameContainer.d.ts.map +1 -1
- package/dist/components/Message/MessageReactions/MessageReaction.d.ts.map +1 -1
- package/dist/components/Message/MessageReactions/MessageReactionAction.d.ts.map +1 -1
- package/dist/components/Message/MessageReactions/MessageReactionCounter.d.ts +1 -1
- package/dist/components/Message/MessageReactions/MessageReactionCounter.d.ts.map +1 -1
- package/dist/components/Message/MessageReactions/MessageReactionEmoji.d.ts.map +1 -1
- package/dist/components/Message/MessageReactions/MessageReactions.d.ts.map +1 -1
- package/dist/components/Message/MessageReactions/index.d.ts +4 -4
- package/dist/components/Message/MessageReactions/index.d.ts.map +1 -1
- package/dist/components/Message/MessageRole.d.ts.map +1 -1
- package/dist/components/Message/MessageRoles.d.ts.map +1 -1
- package/dist/components/Message/MessageStatusIndicator/MessageStatusIndicator.d.ts.map +1 -1
- package/dist/components/Message/MessageStatusIndicator/MessageStatusIndicatorItem.d.ts +2 -1
- package/dist/components/Message/MessageStatusIndicator/MessageStatusIndicatorItem.d.ts.map +1 -1
- package/dist/components/Message/MessageStatusIndicator/MessageStatusIndicatorText.d.ts +1 -1
- package/dist/components/Message/MessageStatusIndicator/MessageStatusIndicatorText.d.ts.map +1 -1
- package/dist/components/Message/MessageStatusIndicator/MessageStatusPrivateIndicator.d.ts +1 -1
- package/dist/components/Message/MessageStatusIndicator/MessageStatusPrivateIndicator.d.ts.map +1 -1
- package/dist/components/Message/MessageStatusIndicator/index.d.ts +4 -4
- package/dist/components/Message/MessageStatusIndicator/index.d.ts.map +1 -1
- package/dist/components/Message/MessageSystem/MessageSystem.d.ts.map +1 -1
- package/dist/components/Message/MessageSystem/MessageSystemBlock.d.ts.map +1 -1
- package/dist/components/Message/MessageSystem/MessageSystemBody.d.ts.map +1 -1
- package/dist/components/Message/MessageSystem/MessageSystemContainer.d.ts.map +1 -1
- package/dist/components/Message/MessageSystem/MessageSystemName.d.ts.map +1 -1
- package/dist/components/Message/MessageSystem/MessageSystemTimestamp.d.ts.map +1 -1
- package/dist/components/Message/MessageSystem/index.d.ts +6 -6
- package/dist/components/Message/MessageSystem/index.d.ts.map +1 -1
- package/dist/components/Message/MessageTimestamp.d.ts.map +1 -1
- package/dist/components/Message/MessageToolbar/MessageToolbar.d.ts.map +1 -1
- package/dist/components/Message/MessageToolbar/MessageToolbarItem.d.ts.map +1 -1
- package/dist/components/Message/MessageToolbar/MessageToolbarWrapper.d.ts.map +1 -1
- package/dist/components/Message/MessageToolbar/index.d.ts +3 -3
- package/dist/components/Message/MessageToolbar/index.d.ts.map +1 -1
- package/dist/components/Message/MessageUsername.d.ts.map +1 -1
- package/dist/components/Message/ThreadMessage/ThreadMessage.d.ts.map +1 -1
- package/dist/components/Message/ThreadMessage/ThreadMessageBody.d.ts.map +1 -1
- package/dist/components/Message/ThreadMessage/ThreadMessageContainer.d.ts.map +1 -1
- package/dist/components/Message/ThreadMessage/ThreadMessageEmoji.d.ts.map +1 -1
- package/dist/components/Message/ThreadMessage/ThreadMessageFollow.d.ts.map +1 -1
- package/dist/components/Message/ThreadMessage/ThreadMessageIcon.d.ts.map +1 -1
- package/dist/components/Message/ThreadMessage/ThreadMessageIconThread.d.ts.map +1 -1
- package/dist/components/Message/ThreadMessage/ThreadMessageLeftContainer.d.ts.map +1 -1
- package/dist/components/Message/ThreadMessage/ThreadMessageOrigin.d.ts +1 -1
- package/dist/components/Message/ThreadMessage/ThreadMessageOrigin.d.ts.map +1 -1
- package/dist/components/Message/ThreadMessage/ThreadMessageRow.d.ts.map +1 -1
- package/dist/components/Message/ThreadMessage/ThreadMessageUnfollow.d.ts.map +1 -1
- package/dist/components/Message/ThreadMessage/index.d.ts +7 -7
- package/dist/components/Message/ThreadMessage/index.d.ts.map +1 -1
- package/dist/components/Message/helpers.d.ts.map +1 -1
- package/dist/components/Message/index.d.ts +11 -11
- package/dist/components/Message/index.d.ts.map +1 -1
- package/dist/components/Modal/Modal.d.ts +11 -2
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/ModalBackdrop.d.ts +6 -3
- package/dist/components/Modal/ModalBackdrop.d.ts.map +1 -1
- package/dist/components/Modal/ModalClose.d.ts +2 -2
- package/dist/components/Modal/ModalClose.d.ts.map +1 -1
- package/dist/components/Modal/ModalContent.d.ts +5 -3
- package/dist/components/Modal/ModalContent.d.ts.map +1 -1
- package/dist/components/Modal/ModalFooter.d.ts +6 -3
- package/dist/components/Modal/ModalFooter.d.ts.map +1 -1
- package/dist/components/Modal/ModalFooterAnnotation.d.ts +2 -2
- package/dist/components/Modal/ModalFooterAnnotation.d.ts.map +1 -1
- package/dist/components/Modal/ModalFooterControllers.d.ts.map +1 -1
- package/dist/components/Modal/ModalHeader.d.ts +2 -2
- package/dist/components/Modal/ModalHeader.d.ts.map +1 -1
- package/dist/components/Modal/ModalHeaderText.d.ts +2 -2
- package/dist/components/Modal/ModalHeaderText.d.ts.map +1 -1
- package/dist/components/Modal/ModalHeroImage.d.ts +8 -1
- package/dist/components/Modal/ModalHeroImage.d.ts.map +1 -1
- package/dist/components/Modal/ModalIcon.d.ts +14 -3
- package/dist/components/Modal/ModalIcon.d.ts.map +1 -1
- package/dist/components/Modal/ModalTagline.d.ts +6 -3
- package/dist/components/Modal/ModalTagline.d.ts.map +1 -1
- package/dist/components/Modal/ModalThumb.d.ts.map +1 -1
- package/dist/components/Modal/ModalTitle.d.ts +2 -2
- package/dist/components/Modal/ModalTitle.d.ts.map +1 -1
- package/dist/components/Modal/index.d.ts +7 -7
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts +6 -2
- package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelectAnchor.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelectAnchorParams.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelectFiltered.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelectFilteredAnchor.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelectFilteredContext.d.ts.map +1 -1
- package/dist/components/MultiSelect/SelectedOptions.d.ts +1 -1
- package/dist/components/MultiSelect/SelectedOptions.d.ts.map +1 -1
- package/dist/components/MultiSelect/index.d.ts +1 -1
- package/dist/components/MultiSelect/index.d.ts.map +1 -1
- package/dist/components/NavBar/NavBar.d.ts.map +1 -1
- package/dist/components/NavBar/NavBarDivider.d.ts +1 -1
- package/dist/components/NavBar/NavBarDivider.d.ts.map +1 -1
- package/dist/components/NavBar/NavBarGroup.d.ts.map +1 -1
- package/dist/components/NavBar/NavBarItem.d.ts.map +1 -1
- package/dist/components/NavBar/NavBarSection.d.ts.map +1 -1
- package/dist/components/NavBar/index.d.ts +2 -2
- package/dist/components/NavBar/index.d.ts.map +1 -1
- package/dist/components/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/components/Option/CheckOption.d.ts +5 -1
- package/dist/components/Option/CheckOption.d.ts.map +1 -1
- package/dist/components/Option/Option.d.ts +12 -7
- package/dist/components/Option/Option.d.ts.map +1 -1
- package/dist/components/Option/OptionAvatar.d.ts.map +1 -1
- package/dist/components/Option/OptionColumn.d.ts +3 -0
- package/dist/components/Option/OptionColumn.d.ts.map +1 -1
- package/dist/components/Option/OptionContent.d.ts +1 -1
- package/dist/components/Option/OptionContent.d.ts.map +1 -1
- package/dist/components/Option/OptionDescription.d.ts.map +1 -1
- package/dist/components/Option/OptionDescriptionBlock.d.ts.map +1 -1
- package/dist/components/Option/OptionDivider.d.ts.map +1 -1
- package/dist/components/Option/OptionHeader.d.ts +3 -0
- package/dist/components/Option/OptionHeader.d.ts.map +1 -1
- package/dist/components/Option/OptionIcon.d.ts +1 -1
- package/dist/components/Option/OptionIcon.d.ts.map +1 -1
- package/dist/components/Option/OptionInput.d.ts.map +1 -1
- package/dist/components/Option/OptionMenu.d.ts +1 -1
- package/dist/components/Option/OptionMenu.d.ts.map +1 -1
- package/dist/components/Option/OptionSkeleton.d.ts.map +1 -1
- package/dist/components/Option/OptionTitle.d.ts +1 -1
- package/dist/components/Option/OptionTitle.d.ts.map +1 -1
- package/dist/components/Option/index.d.ts +7 -7
- package/dist/components/Option/index.d.ts.map +1 -1
- package/dist/components/Options/OptionContainer.d.ts +2 -3
- package/dist/components/Options/OptionContainer.d.ts.map +1 -1
- package/dist/components/Options/OptionType.d.ts +1 -22
- package/dist/components/Options/OptionType.d.ts.map +1 -1
- package/dist/components/Options/Options.d.ts +4 -2
- package/dist/components/Options/Options.d.ts.map +1 -1
- package/dist/components/Options/OptionsEmpty.d.ts +2 -1
- package/dist/components/Options/OptionsEmpty.d.ts.map +1 -1
- package/dist/components/Options/index.d.ts +1 -1
- package/dist/components/Options/index.d.ts.map +1 -1
- package/dist/components/Options/useCursor.d.ts.map +1 -1
- package/dist/components/Options/useVisible.d.ts +2 -6
- package/dist/components/Options/useVisible.d.ts.map +1 -1
- package/dist/components/OptionsPaginated/OptionsPaginated.d.ts +6 -8
- package/dist/components/OptionsPaginated/OptionsPaginated.d.ts.map +1 -1
- package/dist/components/PaginatedSelect/PaginatedMultiSelect.d.ts +6 -3
- package/dist/components/PaginatedSelect/PaginatedMultiSelect.d.ts.map +1 -1
- package/dist/components/PaginatedSelect/PaginatedMultiSelectFiltered.d.ts.map +1 -1
- package/dist/components/PaginatedSelect/PaginatedSelect.d.ts +1 -1
- package/dist/components/PaginatedSelect/PaginatedSelect.d.ts.map +1 -1
- package/dist/components/PaginatedSelect/PaginatedSelectFiltered.d.ts.map +1 -1
- package/dist/components/PaginatedSelect/index.d.ts +4 -4
- package/dist/components/PaginatedSelect/index.d.ts.map +1 -1
- package/dist/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/components/Pagination/index.d.ts +1 -1
- package/dist/components/Pagination/index.d.ts.map +1 -1
- package/dist/components/PaletteStyleTag/PaletteStyleTag.d.ts +1 -1
- package/dist/components/PaletteStyleTag/PaletteStyleTag.d.ts.map +1 -1
- package/dist/components/PaletteStyleTag/helpers/convertToCss.d.ts.map +1 -1
- package/dist/components/PaletteStyleTag/helpers/getPalette.d.ts +4 -4
- package/dist/components/PaletteStyleTag/helpers/getPalette.d.ts.map +1 -1
- package/dist/components/PaletteStyleTag/hooks/useCreateStyleContainer.d.ts.map +1 -1
- package/dist/components/PaletteStyleTag/index.d.ts +1 -1
- package/dist/components/PaletteStyleTag/index.d.ts.map +1 -1
- package/dist/components/PasswordInput/PasswordInput.d.ts.map +1 -1
- package/dist/components/PasswordInput/index.d.ts +1 -1
- package/dist/components/PasswordInput/index.d.ts.map +1 -1
- package/dist/components/Popover/Popover.d.ts.map +1 -1
- package/dist/components/PopoverSurface/PopoverSurface.d.ts +15 -0
- package/dist/components/PopoverSurface/PopoverSurface.d.ts.map +1 -0
- package/dist/components/PopoverSurface/index.d.ts +2 -0
- package/dist/components/PopoverSurface/index.d.ts.map +1 -0
- package/dist/components/PositionAnimated/Position.d.ts +5 -3
- package/dist/components/PositionAnimated/Position.d.ts.map +1 -1
- package/dist/components/PositionAnimated/PositionAnimated.d.ts +4 -3
- package/dist/components/PositionAnimated/PositionAnimated.d.ts.map +1 -1
- package/dist/components/PositionAnimated/index.d.ts +1 -1
- package/dist/components/PositionAnimated/index.d.ts.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/components/RadioButton/RadioButton.d.ts +3 -3
- package/dist/components/RadioButton/RadioButton.d.ts.map +1 -1
- package/dist/components/Scrollable/Scrollable.d.ts +1 -1
- package/dist/components/Scrollable/Scrollable.d.ts.map +1 -1
- package/dist/components/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts +15 -8
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/SelectAddon.d.ts +2 -3
- package/dist/components/Select/SelectAddon.d.ts.map +1 -1
- package/dist/components/Select/SelectAnchorParams.d.ts.map +1 -1
- package/dist/components/Select/SelectFiltered.d.ts.map +1 -1
- package/dist/components/Select/SelectFilteredAnchor.d.ts.map +1 -1
- package/dist/components/Select/SelectFilteredContext.d.ts.map +1 -1
- package/dist/components/Select/SelectFocus.d.ts +3 -3
- package/dist/components/Select/SelectFocus.d.ts.map +1 -1
- package/dist/components/Select/SelectLegacy.d.ts +8 -8
- package/dist/components/Select/SelectLegacy.d.ts.map +1 -1
- package/dist/components/Select/index.d.ts +2 -2
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Select/useTypeahead.d.ts +17 -0
- package/dist/components/Select/useTypeahead.d.ts.map +1 -0
- package/dist/components/Sidebar/Sidebar.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarAccordion.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarAccordionItem.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarAction.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarActions.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarBanner.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarButtonGroup.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarCollapseGroup.d.ts +1 -1
- package/dist/components/Sidebar/SidebarCollapseGroup.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarCollapseGroupMenu.d.ts +1 -1
- package/dist/components/Sidebar/SidebarCollapseGroupMenu.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarDivider.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarFooter/SidebarFooter.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarFooter/SidebarFooterContent.d.ts +2 -2
- package/dist/components/Sidebar/SidebarFooter/SidebarFooterContent.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarGroupTitle.d.ts +4 -1
- package/dist/components/Sidebar/SidebarGroupTitle.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarItem/SidebarItem.d.ts +20 -1
- package/dist/components/Sidebar/SidebarItem/SidebarItem.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarItem/SidebarItemAction.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarItem/SidebarItemActions.d.ts +8 -0
- package/dist/components/Sidebar/SidebarItem/SidebarItemActions.d.ts.map +1 -0
- package/dist/components/Sidebar/SidebarItem/SidebarItemAvatarWrapper.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarItem/SidebarItemBadge.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarItem/SidebarItemCol.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarItem/SidebarItemContent.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarItem/SidebarItemIcon.d.ts +6 -2
- package/dist/components/Sidebar/SidebarItem/SidebarItemIcon.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarItem/SidebarItemLink.d.ts +8 -0
- package/dist/components/Sidebar/SidebarItem/SidebarItemLink.d.ts.map +1 -0
- package/dist/components/Sidebar/SidebarItem/SidebarItemMenu.d.ts +1 -1
- package/dist/components/Sidebar/SidebarItem/SidebarItemMenu.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarItem/SidebarItemRow.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarItem/SidebarItemStatusBullet.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarItem/SidebarItemTimestamp.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarItem/SidebarItemTitle.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarItem/SidebarListItem.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarItem/index.d.ts +2 -0
- package/dist/components/Sidebar/SidebarItem/index.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarLink.d.ts +1 -1
- package/dist/components/Sidebar/SidebarLink.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarMedia/SidebarMedia.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarMedia/SidebarMediaController.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarMedia/SidebarMediaTitle.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarSection.d.ts.map +1 -1
- package/dist/components/Sidebar/helpers.d.ts.map +1 -1
- package/dist/components/Sidebar/hooks/useCollapse.d.ts +4 -4
- package/dist/components/Sidebar/hooks/useCollapse.d.ts.map +1 -1
- package/dist/components/Sidebar/index.d.ts +6 -6
- package/dist/components/Sidebar/index.d.ts.map +1 -1
- package/dist/components/Sidepanel/Sidepanel.d.ts.map +1 -1
- package/dist/components/Sidepanel/SidepanelDivider.d.ts.map +1 -1
- package/dist/components/Sidepanel/SidepanelHeader.d.ts.map +1 -1
- package/dist/components/Sidepanel/SidepanelHeaderTitle.d.ts.map +1 -1
- package/dist/components/Sidepanel/SidepanelList.d.ts.map +1 -1
- package/dist/components/Sidepanel/SidepanelListItem.d.ts.map +1 -1
- package/dist/components/Sidepanel/SidepanelSection.d.ts.map +1 -1
- package/dist/components/Sidepanel/SidepanelSectionAction.d.ts.map +1 -1
- package/dist/components/Sidepanel/index.d.ts +6 -6
- package/dist/components/Sidepanel/index.d.ts.map +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts +10 -5
- package/dist/components/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/components/Slider/Slider.d.ts.map +1 -1
- package/dist/components/Slider/SliderHead.d.ts +1 -1
- package/dist/components/Slider/SliderHead.d.ts.map +1 -1
- package/dist/components/Slider/SliderThumb.d.ts.map +1 -1
- package/dist/components/Slider/SliderTrack.d.ts +1 -1
- package/dist/components/Slider/SliderTrack.d.ts.map +1 -1
- package/dist/components/SplitButton/SplitButton.d.ts.map +1 -1
- package/dist/components/SplitButton/SplitButtonTrigger.d.ts +1 -1
- package/dist/components/SplitButton/SplitButtonTrigger.d.ts.map +1 -1
- package/dist/components/SplitButton/index.d.ts +1 -1
- package/dist/components/SplitButton/index.d.ts.map +1 -1
- package/dist/components/Stack/Stack.d.ts +16 -0
- package/dist/components/Stack/Stack.d.ts.map +1 -0
- package/dist/components/Stack/index.d.ts +2 -0
- package/dist/components/Stack/index.d.ts.map +1 -0
- package/dist/components/States/States.d.ts.map +1 -1
- package/dist/components/States/StatesAction.d.ts +1 -1
- package/dist/components/States/StatesAction.d.ts.map +1 -1
- package/dist/components/States/StatesActions.d.ts.map +1 -1
- package/dist/components/States/StatesIcon.d.ts +1 -1
- package/dist/components/States/StatesIcon.d.ts.map +1 -1
- package/dist/components/States/StatesLink.d.ts +3 -3
- package/dist/components/States/StatesLink.d.ts.map +1 -1
- package/dist/components/States/StatesSubtitle.d.ts.map +1 -1
- package/dist/components/States/StatesSuggestion.d.ts.map +1 -1
- package/dist/components/States/StatesSuggestionList.d.ts.map +1 -1
- package/dist/components/States/StatesSuggestionListItem.d.ts.map +1 -1
- package/dist/components/States/StatesSuggestionText.d.ts.map +1 -1
- package/dist/components/States/StatesTitle.d.ts.map +1 -1
- package/dist/components/States/index.d.ts +7 -7
- package/dist/components/States/index.d.ts.map +1 -1
- package/dist/components/StatusBullet/StatusBullet.d.ts.map +1 -1
- package/dist/components/StatusBullet/icons/Away.d.ts.map +1 -1
- package/dist/components/StatusBullet/icons/Busy.d.ts.map +1 -1
- package/dist/components/StatusBullet/icons/Disabled.d.ts.map +1 -1
- package/dist/components/StatusBullet/icons/Loading.d.ts.map +1 -1
- package/dist/components/StatusBullet/icons/Offline.d.ts.map +1 -1
- package/dist/components/StatusBullet/icons/Online.d.ts.map +1 -1
- package/dist/components/StatusBullet/index.d.ts +1 -1
- package/dist/components/StatusBullet/index.d.ts.map +1 -1
- package/dist/components/Table/Table.d.ts +8 -3
- package/dist/components/Table/Table.d.ts.map +1 -1
- package/dist/components/Table/TableBody.d.ts +2 -2
- package/dist/components/Table/TableBody.d.ts.map +1 -1
- package/dist/components/Table/TableCell.d.ts +13 -3
- package/dist/components/Table/TableCell.d.ts.map +1 -1
- package/dist/components/Table/TableFoot.d.ts +2 -2
- package/dist/components/Table/TableFoot.d.ts.map +1 -1
- package/dist/components/Table/TableHead.d.ts +2 -2
- package/dist/components/Table/TableHead.d.ts.map +1 -1
- package/dist/components/Table/TableRow.d.ts +3 -2
- package/dist/components/Table/TableRow.d.ts.map +1 -1
- package/dist/components/Table/TableSelection/TableSelection.d.ts +2 -2
- package/dist/components/Table/TableSelection/TableSelection.d.ts.map +1 -1
- package/dist/components/Table/TableSelection/TableSelectionButton.d.ts +1 -1
- package/dist/components/Table/TableSelection/TableSelectionButton.d.ts.map +1 -1
- package/dist/components/Table/TableSelection/TableSelectionButtonGroup.d.ts.map +1 -1
- package/dist/components/Table/TableSelection/index.d.ts +3 -3
- package/dist/components/Table/TableSelection/index.d.ts.map +1 -1
- package/dist/components/Table/index.d.ts +1 -1
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts +5 -3
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs/TabsItem.d.ts +3 -3
- package/dist/components/Tabs/TabsItem.d.ts.map +1 -1
- package/dist/components/Tag/Tag.d.ts +8 -4
- package/dist/components/Tag/Tag.d.ts.map +1 -1
- package/dist/components/Text/Text.d.ts +306 -0
- package/dist/components/Text/Text.d.ts.map +1 -0
- package/dist/components/Text/index.d.ts +2 -0
- package/dist/components/Text/index.d.ts.map +1 -0
- package/dist/components/TextAreaInput/TextAreaInput.d.ts.map +1 -1
- package/dist/components/TextAreaInput/index.d.ts +1 -1
- package/dist/components/TextAreaInput/index.d.ts.map +1 -1
- package/dist/components/TextInput/TextInput.d.ts.map +1 -1
- package/dist/components/Throbber/Throbber.d.ts +3 -2
- package/dist/components/Throbber/Throbber.d.ts.map +1 -1
- package/dist/components/Tile/Tile.d.ts +7 -3
- package/dist/components/Tile/Tile.d.ts.map +1 -1
- package/dist/components/ToastBar/ToastBar.d.ts.map +1 -1
- package/dist/components/ToggleSwitch/ToggleSwitch.d.ts +3 -3
- package/dist/components/ToggleSwitch/ToggleSwitch.d.ts.map +1 -1
- package/dist/components/ToggleSwitch/index.d.ts +1 -1
- package/dist/components/ToggleSwitch/index.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +2 -3
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/UrlInput/UrlInput.d.ts.map +1 -1
- package/dist/components/index.d.ts +5 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/contexts/OwnerDocument.d.ts.map +1 -1
- package/dist/fuselage.css +1 -1
- package/dist/fuselage.development.css +996 -282
- package/dist/fuselage.development.js +1647 -1029
- package/dist/fuselage.development.js.map +1 -1
- package/dist/fuselage.production.js +176 -177
- package/dist/getPaletteColor.d.ts +7 -7
- package/dist/getPaletteColor.d.ts.map +1 -1
- package/dist/helpers/WithErrorWrapper.d.ts +1 -1
- package/dist/helpers/WithErrorWrapper.d.ts.map +1 -1
- package/dist/helpers/appendClassName.d.ts.map +1 -1
- package/dist/helpers/composeClassNames.d.ts.map +1 -1
- package/dist/helpers/exhaustiveCheck.d.ts.map +1 -1
- package/dist/helpers/fromCamelToKebab.d.ts.map +1 -1
- package/dist/helpers/patchChildren.d.ts.map +1 -1
- package/dist/helpers/prependClassName.d.ts.map +1 -1
- package/dist/helpers/prevent.d.ts.map +1 -1
- package/dist/helpers/setStoryDescription.d.ts.map +1 -1
- package/dist/helpers/shallowEqual.d.ts.map +1 -1
- package/dist/helpers/toCSSValue.d.ts.map +1 -1
- package/dist/hooks/useArrayLikeClassNameProp.d.ts.map +1 -1
- package/dist/hooks/useBoxOnlyProps.d.ts +3 -3
- package/dist/hooks/useBoxOnlyProps.d.ts.map +1 -1
- package/dist/hooks/useStyle.d.ts +2 -1
- package/dist/hooks/useStyle.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/styleTokens.d.ts +12 -9
- package/dist/styleTokens.d.ts.map +1 -1
- package/dist/types/ElementProps.d.ts +8 -0
- package/dist/types/ElementProps.d.ts.map +1 -0
- package/index.js +2 -3
- package/package.json +42 -48
- package/dist/components/PaginatedSelect/PaginatedSelectWrapper.d.ts +0 -6
- package/dist/components/PaginatedSelect/PaginatedSelectWrapper.d.ts.map +0 -1
- package/dist/components/Select/Listbox.d.ts +0 -10
- package/dist/components/Select/Listbox.d.ts.map +0 -1
- package/dist/components/Select/SelectAria.d.ts +0 -12
- package/dist/components/Select/SelectAria.d.ts.map +0 -1
- package/dist/components/Select/SelectTrigger.d.ts +0 -10
- package/dist/components/Select/SelectTrigger.d.ts.map +0 -1
- package/dist/tsdoc-metadata.json +0 -11
|
@@ -44,6 +44,8 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
44
44
|
_rocket_chat_fuselage_tokens_dist_surface_json = __toESM(_rocket_chat_fuselage_tokens_dist_surface_json);
|
|
45
45
|
let _rocket_chat_fuselage_tokens_dist_border_json = require("@rocket.chat/fuselage-tokens/dist/border.json");
|
|
46
46
|
_rocket_chat_fuselage_tokens_dist_border_json = __toESM(_rocket_chat_fuselage_tokens_dist_border_json);
|
|
47
|
+
let _rocket_chat_fuselage_tokens_dist_spacing_json = require("@rocket.chat/fuselage-tokens/dist/spacing.json");
|
|
48
|
+
_rocket_chat_fuselage_tokens_dist_spacing_json = __toESM(_rocket_chat_fuselage_tokens_dist_spacing_json);
|
|
47
49
|
let _rocket_chat_fuselage_tokens_dist_typography_json = require("@rocket.chat/fuselage-tokens/dist/typography.json");
|
|
48
50
|
_rocket_chat_fuselage_tokens_dist_typography_json = __toESM(_rocket_chat_fuselage_tokens_dist_typography_json);
|
|
49
51
|
let _rocket_chat_memo = require("@rocket.chat/memo");
|
|
@@ -169,98 +171,6 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
169
171
|
return classNames.join(" ");
|
|
170
172
|
};
|
|
171
173
|
//#endregion
|
|
172
|
-
//#region src/helpers/appendClassName.ts
|
|
173
|
-
var appendClassName = (currentClassName, newClassName) => {
|
|
174
|
-
if (currentClassName === void 0 || currentClassName === "") return newClassName;
|
|
175
|
-
if (Array.isArray(currentClassName)) return [...currentClassName, newClassName];
|
|
176
|
-
return `${currentClassName} ${newClassName}`;
|
|
177
|
-
};
|
|
178
|
-
//#endregion
|
|
179
|
-
//#region src/contexts/OwnerDocument.ts
|
|
180
|
-
var OwnerDocument = (0, react.createContext)({ document: window.document });
|
|
181
|
-
var useOwnerDocument = () => {
|
|
182
|
-
return (0, react.useContext)(OwnerDocument);
|
|
183
|
-
};
|
|
184
|
-
//#endregion
|
|
185
|
-
//#region src/hooks/useStyle.ts
|
|
186
|
-
var useStyle = (cssFn, arg) => {
|
|
187
|
-
const content = (0, react.useMemo)(() => cssFn ? cssFn(arg) : void 0, [arg, cssFn]);
|
|
188
|
-
const className = (0, react.useMemo)(() => {
|
|
189
|
-
if (!content) return;
|
|
190
|
-
return content ? (0, _rocket_chat_css_in_js.createClassName)(content) : void 0;
|
|
191
|
-
}, [content]);
|
|
192
|
-
(0, react.useDebugValue)(className);
|
|
193
|
-
const { document } = useOwnerDocument();
|
|
194
|
-
(0, react.useInsertionEffect)(() => {
|
|
195
|
-
if (!content || !className) return;
|
|
196
|
-
const escapedClassName = (0, _rocket_chat_css_in_js.escapeName)(className);
|
|
197
|
-
const transpiledContent = (0, _rocket_chat_css_in_js.transpile)(`.${escapedClassName}`, content);
|
|
198
|
-
const detach = (0, _rocket_chat_css_in_js.attachRules)(transpiledContent, { document });
|
|
199
|
-
return () => {
|
|
200
|
-
setTimeout(detach, 1e3);
|
|
201
|
-
};
|
|
202
|
-
}, [
|
|
203
|
-
className,
|
|
204
|
-
content,
|
|
205
|
-
document
|
|
206
|
-
]);
|
|
207
|
-
return className;
|
|
208
|
-
};
|
|
209
|
-
//#endregion
|
|
210
|
-
//#region src/hooks/useArrayLikeClassNameProp.ts
|
|
211
|
-
var useArrayLikeClassNameProp = (props) => {
|
|
212
|
-
const classNames = props.className ? [].concat(props.className) : [];
|
|
213
|
-
const cssFns = classNames.filter((value) => typeof value === "function");
|
|
214
|
-
const stylesClassName = useStyle(_rocket_chat_css_in_js.css`
|
|
215
|
-
${cssFns}
|
|
216
|
-
`, props);
|
|
217
|
-
const className = classNames.filter((value) => typeof value === "string").reduce((className, string) => appendClassName(className, string), stylesClassName || "");
|
|
218
|
-
return Object.assign(props, { className });
|
|
219
|
-
};
|
|
220
|
-
//#endregion
|
|
221
|
-
//#region src/helpers/prependClassName.ts
|
|
222
|
-
var isStringArray = (value) => Array.isArray(value);
|
|
223
|
-
var prependClassName = (currentClassName, newClassName) => {
|
|
224
|
-
if (isStringArray(currentClassName)) return [newClassName, ...currentClassName];
|
|
225
|
-
if (currentClassName) return `${newClassName} ${currentClassName}`;
|
|
226
|
-
return newClassName;
|
|
227
|
-
};
|
|
228
|
-
//#endregion
|
|
229
|
-
//#region src/hooks/useBoxOnlyProps.ts
|
|
230
|
-
var useBoxOnlyProps = (props) => {
|
|
231
|
-
Object.entries(props).forEach(([key, value]) => {
|
|
232
|
-
if (key.slice(0, 4) === "rcx-") try {
|
|
233
|
-
if (!value) return;
|
|
234
|
-
const newClassName = value === true ? key : `${key}-${value}`;
|
|
235
|
-
props.className = prependClassName(props.className, newClassName);
|
|
236
|
-
} finally {
|
|
237
|
-
delete props[key];
|
|
238
|
-
}
|
|
239
|
-
});
|
|
240
|
-
if (props.animated) {
|
|
241
|
-
props.className = prependClassName(props.className, "rcx-box--animated");
|
|
242
|
-
delete props.animated;
|
|
243
|
-
}
|
|
244
|
-
if (props.withRichContent) {
|
|
245
|
-
if (props.withRichContent === "inlineWithoutBreaks") props.className = prependClassName(props.className, "rcx-box--with-inline-elements");
|
|
246
|
-
else {
|
|
247
|
-
props.className = prependClassName(props.className, "rcx-box--with-inline-elements");
|
|
248
|
-
props.className = prependClassName(props.className, "rcx-box--with-block-elements");
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
if (props.htmlSize) {
|
|
252
|
-
props.size = props.htmlSize;
|
|
253
|
-
delete props.htmlSize;
|
|
254
|
-
}
|
|
255
|
-
if (props.focusable) {
|
|
256
|
-
props.className = prependClassName(props.className, "rcx-box--focusable");
|
|
257
|
-
delete props.focusable;
|
|
258
|
-
}
|
|
259
|
-
delete props.withRichContent;
|
|
260
|
-
props.className = prependClassName(props.className, "rcx-box rcx-box--full");
|
|
261
|
-
return props;
|
|
262
|
-
};
|
|
263
|
-
//#endregion
|
|
264
174
|
//#region src/components/Box/BoxTransforms.ts
|
|
265
175
|
var BoxTransforms = (0, react.createContext)(null);
|
|
266
176
|
var useBoxTransform = () => (0, react.useContext)(BoxTransforms);
|
|
@@ -310,7 +220,6 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
310
220
|
800: new Var("neutral-800", _rocket_chat_fuselage_tokens_dist_colors_json.default.n800),
|
|
311
221
|
900: new Var("neutral-900", _rocket_chat_fuselage_tokens_dist_colors_json.default.n900)
|
|
312
222
|
};
|
|
313
|
-
var primitive = (ref, name) => new Var(name, _rocket_chat_fuselage_tokens_dist_colors_json.default[ref]);
|
|
314
223
|
var surfaceTokens = _rocket_chat_fuselage_tokens_dist_surface_json.default.light;
|
|
315
224
|
var surfaceColors = {
|
|
316
225
|
"surface-light": new Var("surface-light", surfaceTokens.light),
|
|
@@ -366,7 +275,7 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
366
275
|
var statusColors = {
|
|
367
276
|
"status-font-on-info": new Var("status-font-on-info", statusTokens["font-on-info"]),
|
|
368
277
|
"status-font-on-success": new Var("status-font-on-success", statusTokens["font-on-success"]),
|
|
369
|
-
"status-font-on-warning":
|
|
278
|
+
"status-font-on-warning": new Var("status-font-on-warning", statusTokens["font-on-warning"]),
|
|
370
279
|
"status-font-on-warning-2": new Var("status-font-on-warning-2", statusTokens["font-on-warning-2"]),
|
|
371
280
|
"status-font-on-danger": new Var("status-font-on-danger", statusTokens["font-on-danger"]),
|
|
372
281
|
"status-font-on-service-1": new Var("status-font-on-service-1", statusTokens["font-on-service-1"]),
|
|
@@ -433,6 +342,8 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
433
342
|
};
|
|
434
343
|
//#endregion
|
|
435
344
|
//#region src/styleTokens.ts
|
|
345
|
+
var spacingScale = _rocket_chat_fuselage_tokens_dist_spacing_json.default;
|
|
346
|
+
var isSpacingToken = (value) => Object.hasOwn(_rocket_chat_fuselage_tokens_dist_spacing_json.default, value);
|
|
436
347
|
var measure = (computeSpecialValue) => (0, _rocket_chat_memo.memoize)((value) => {
|
|
437
348
|
if (typeof value === "number") return `${value}px`;
|
|
438
349
|
if (typeof value !== "string") return;
|
|
@@ -519,7 +430,18 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
519
430
|
if (value === "sw") return "100vw";
|
|
520
431
|
if (value === "sh") return "100vh";
|
|
521
432
|
});
|
|
522
|
-
var spacing =
|
|
433
|
+
var spacing = (0, _rocket_chat_memo.memoize)((value) => {
|
|
434
|
+
if (typeof value === "number") return `${value}px`;
|
|
435
|
+
if (typeof value !== "string") return;
|
|
436
|
+
if (value === "none") return "0px";
|
|
437
|
+
const [, negativeMark, step] = /^(neg-|-)?x(\d+)$/.exec(value) ?? [];
|
|
438
|
+
if (!step) return value;
|
|
439
|
+
const token = `x${step}`;
|
|
440
|
+
const pixels = isSpacingToken(token) ? _rocket_chat_fuselage_tokens_dist_spacing_json.default[token] : Number(step);
|
|
441
|
+
return `${(negativeMark ? -1 : 1) * pixels}px`;
|
|
442
|
+
});
|
|
443
|
+
/** @internal */
|
|
444
|
+
var inset = measure((value) => {
|
|
523
445
|
if (value === "none") return "0px";
|
|
524
446
|
});
|
|
525
447
|
var isFontFamily = (value) => typeof value === "string" && value in _rocket_chat_fuselage_tokens_dist_typography_json.default.fontFamily;
|
|
@@ -550,7 +472,7 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
550
472
|
var fontColorProp = { toCSSValue: fontColor };
|
|
551
473
|
var strokeColorProp = { toCSSValue: strokeColor };
|
|
552
474
|
var sizeProp = { toCSSValue: size };
|
|
553
|
-
var insetProp = { toCSSValue:
|
|
475
|
+
var insetProp = { toCSSValue: inset };
|
|
554
476
|
var marginProp = { toCSSValue: spacing };
|
|
555
477
|
var paddingProp = { toCSSValue: spacing };
|
|
556
478
|
var gapProp = { toCSSValue: spacing };
|
|
@@ -653,54 +575,54 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
653
575
|
wordBreak: stringProp,
|
|
654
576
|
elevation: { toStyle: (value) => {
|
|
655
577
|
if (value === "0") return _rocket_chat_css_in_js.css`
|
|
656
|
-
|
|
657
|
-
|
|
578
|
+
box-shadow: none;
|
|
579
|
+
`;
|
|
658
580
|
if (value === "1") return _rocket_chat_css_in_js.css`
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
581
|
+
box-shadow: 0px 0px 12px 0px ${Palette.shadow["shadow-elevation-1"]};
|
|
582
|
+
border: 1px solid ${Palette.shadow["shadow-elevation-border"]};
|
|
583
|
+
`;
|
|
662
584
|
if (value === "1nb") return _rocket_chat_css_in_js.css`
|
|
663
|
-
|
|
664
|
-
|
|
585
|
+
box-shadow: 0px 0px 12px 0px ${Palette.shadow["shadow-elevation-1"]};
|
|
586
|
+
`;
|
|
665
587
|
if (value === "2") return _rocket_chat_css_in_js.css`
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
588
|
+
box-shadow:
|
|
589
|
+
0px 0px 2px 0px ${Palette.shadow["shadow-elevation-2x"]},
|
|
590
|
+
0px 0px 12px 0px ${Palette.shadow["shadow-elevation-2y"]};
|
|
591
|
+
border: 1px solid ${Palette.shadow["shadow-elevation-border"]};
|
|
592
|
+
`;
|
|
671
593
|
if (value === "2nb") return _rocket_chat_css_in_js.css`
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
594
|
+
box-shadow:
|
|
595
|
+
0px 0px 2px 0px ${Palette.shadow["shadow-elevation-2x"]},
|
|
596
|
+
0px 0px 12px 0px ${Palette.shadow["shadow-elevation-2y"]};
|
|
597
|
+
`;
|
|
676
598
|
} },
|
|
677
599
|
invisible: { toStyle: (value) => value ? _rocket_chat_css_in_js.css`
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
600
|
+
visibility: hidden;
|
|
601
|
+
opacity: 0;
|
|
602
|
+
` : void 0 },
|
|
681
603
|
withTruncatedText: { toStyle: (value) => value ? _rocket_chat_css_in_js.css`
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
604
|
+
overflow: hidden;
|
|
605
|
+
text-overflow: ellipsis;
|
|
606
|
+
white-space: nowrap;
|
|
607
|
+
` : void 0 },
|
|
686
608
|
size: { toStyle: (value) => size(value) ? _rocket_chat_css_in_js.css`
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
609
|
+
width: ${size(value)} !important;
|
|
610
|
+
height: ${size(value)} !important;
|
|
611
|
+
` : void 0 },
|
|
690
612
|
minSize: { toStyle: (value) => size(value) ? _rocket_chat_css_in_js.css`
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
613
|
+
min-width: ${size(value)} !important;
|
|
614
|
+
min-height: ${size(value)} !important;
|
|
615
|
+
` : void 0 },
|
|
694
616
|
maxSize: { toStyle: (value) => size(value) ? _rocket_chat_css_in_js.css`
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
617
|
+
max-width: ${size(value)} !important;
|
|
618
|
+
max-height: ${size(value)} !important;
|
|
619
|
+
` : void 0 },
|
|
698
620
|
fontScale: { toStyle: (value) => _rocket_chat_css_in_js.css`
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
621
|
+
font-size: ${fontScale(value)?.fontSize} !important;
|
|
622
|
+
font-weight: ${fontScale(value)?.fontWeight} !important;
|
|
623
|
+
letter-spacing: ${fontScale(value)?.letterSpacing} !important;
|
|
624
|
+
line-height: ${fontScale(value)?.lineHeight} !important;
|
|
625
|
+
` }
|
|
704
626
|
}).map(([propName, propDef]) => {
|
|
705
627
|
if ("toCSSValue" in propDef) {
|
|
706
628
|
const cssProperty = fromCamelToKebab(propName);
|
|
@@ -709,8 +631,8 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
709
631
|
const cssValue = toCSSValue(value);
|
|
710
632
|
if (cssValue === void 0) return;
|
|
711
633
|
stylingProps.set(propName, _rocket_chat_css_in_js.css`
|
|
712
|
-
|
|
713
|
-
|
|
634
|
+
${cssProperty}: ${cssValue} !important;
|
|
635
|
+
`);
|
|
714
636
|
}];
|
|
715
637
|
}
|
|
716
638
|
const { toStyle } = propDef;
|
|
@@ -733,8 +655,47 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
733
655
|
inject(value, stylingProps);
|
|
734
656
|
}
|
|
735
657
|
return [newProps, stylingProps.size ? _rocket_chat_css_in_js.css`
|
|
736
|
-
|
|
737
|
-
|
|
658
|
+
${Array.from(stylingProps.values())}
|
|
659
|
+
` : void 0];
|
|
660
|
+
};
|
|
661
|
+
//#endregion
|
|
662
|
+
//#region src/helpers/appendClassName.ts
|
|
663
|
+
var appendClassName = (currentClassName, newClassName) => {
|
|
664
|
+
if (currentClassName === void 0 || currentClassName === "") return newClassName;
|
|
665
|
+
if (Array.isArray(currentClassName)) return [...currentClassName, newClassName];
|
|
666
|
+
return `${currentClassName} ${newClassName}`;
|
|
667
|
+
};
|
|
668
|
+
//#endregion
|
|
669
|
+
//#region src/contexts/OwnerDocument.ts
|
|
670
|
+
var OwnerDocument = (0, react.createContext)({ document: window.document });
|
|
671
|
+
var useOwnerDocument = () => {
|
|
672
|
+
return (0, react.useContext)(OwnerDocument);
|
|
673
|
+
};
|
|
674
|
+
//#endregion
|
|
675
|
+
//#region src/hooks/useStyle.ts
|
|
676
|
+
/** Attaches a `css` style to the document and returns its class name, for a `className` that takes strings only. */
|
|
677
|
+
var useStyle = (cssFn, arg) => {
|
|
678
|
+
const content = (0, react.useMemo)(() => cssFn ? cssFn(arg) : void 0, [arg, cssFn]);
|
|
679
|
+
const className = (0, react.useMemo)(() => {
|
|
680
|
+
if (!content) return;
|
|
681
|
+
return content ? (0, _rocket_chat_css_in_js.createClassName)(content) : void 0;
|
|
682
|
+
}, [content]);
|
|
683
|
+
(0, react.useDebugValue)(className);
|
|
684
|
+
const { document } = useOwnerDocument();
|
|
685
|
+
(0, react.useInsertionEffect)(() => {
|
|
686
|
+
if (!content || !className) return;
|
|
687
|
+
const escapedClassName = (0, _rocket_chat_css_in_js.escapeName)(className);
|
|
688
|
+
const transpiledContent = (0, _rocket_chat_css_in_js.transpile)(`.${escapedClassName}`, content);
|
|
689
|
+
const detach = (0, _rocket_chat_css_in_js.attachRules)(transpiledContent, { document });
|
|
690
|
+
return () => {
|
|
691
|
+
setTimeout(detach, 1e3);
|
|
692
|
+
};
|
|
693
|
+
}, [
|
|
694
|
+
className,
|
|
695
|
+
content,
|
|
696
|
+
document
|
|
697
|
+
]);
|
|
698
|
+
return className;
|
|
738
699
|
};
|
|
739
700
|
//#endregion
|
|
740
701
|
//#region src/components/Box/useStylingProps.ts
|
|
@@ -745,6 +706,60 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
745
706
|
return props;
|
|
746
707
|
};
|
|
747
708
|
//#endregion
|
|
709
|
+
//#region src/hooks/useArrayLikeClassNameProp.ts
|
|
710
|
+
var useArrayLikeClassNameProp = (props) => {
|
|
711
|
+
const classNames = props.className ? [].concat(props.className) : [];
|
|
712
|
+
const cssFns = classNames.filter((value) => typeof value === "function");
|
|
713
|
+
const stylesClassName = useStyle(_rocket_chat_css_in_js.css`
|
|
714
|
+
${cssFns}
|
|
715
|
+
`, props);
|
|
716
|
+
const className = classNames.filter((value) => typeof value === "string").reduce((className, string) => appendClassName(className, string), stylesClassName || "");
|
|
717
|
+
return Object.assign(props, { className });
|
|
718
|
+
};
|
|
719
|
+
//#endregion
|
|
720
|
+
//#region src/helpers/prependClassName.ts
|
|
721
|
+
var isStringArray = (value) => Array.isArray(value);
|
|
722
|
+
var prependClassName = (currentClassName, newClassName) => {
|
|
723
|
+
if (isStringArray(currentClassName)) return [newClassName, ...currentClassName];
|
|
724
|
+
if (currentClassName) return `${newClassName} ${currentClassName}`;
|
|
725
|
+
return newClassName;
|
|
726
|
+
};
|
|
727
|
+
//#endregion
|
|
728
|
+
//#region src/hooks/useBoxOnlyProps.ts
|
|
729
|
+
var useBoxOnlyProps = (props) => {
|
|
730
|
+
Object.entries(props).forEach(([key, value]) => {
|
|
731
|
+
if (key.slice(0, 4) === "rcx-") try {
|
|
732
|
+
if (!value) return;
|
|
733
|
+
const newClassName = value === true ? key : `${key}-${value}`;
|
|
734
|
+
props.className = prependClassName(props.className, newClassName);
|
|
735
|
+
} finally {
|
|
736
|
+
delete props[key];
|
|
737
|
+
}
|
|
738
|
+
});
|
|
739
|
+
if (props.animated) {
|
|
740
|
+
props.className = prependClassName(props.className, "rcx-box--animated");
|
|
741
|
+
delete props.animated;
|
|
742
|
+
}
|
|
743
|
+
if (props.withRichContent) {
|
|
744
|
+
if (props.withRichContent === "inlineWithoutBreaks") props.className = prependClassName(props.className, "rcx-box--with-inline-elements");
|
|
745
|
+
else {
|
|
746
|
+
props.className = prependClassName(props.className, "rcx-box--with-inline-elements");
|
|
747
|
+
props.className = prependClassName(props.className, "rcx-box--with-block-elements");
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
if (props.htmlSize) {
|
|
751
|
+
props.size = props.htmlSize;
|
|
752
|
+
delete props.htmlSize;
|
|
753
|
+
}
|
|
754
|
+
if (props.focusable) {
|
|
755
|
+
props.className = prependClassName(props.className, "rcx-box--focusable");
|
|
756
|
+
delete props.focusable;
|
|
757
|
+
}
|
|
758
|
+
delete props.withRichContent;
|
|
759
|
+
props.className = prependClassName(props.className, "rcx-box rcx-box--full");
|
|
760
|
+
return props;
|
|
761
|
+
};
|
|
762
|
+
//#endregion
|
|
748
763
|
//#region src/components/Box/Box.tsx
|
|
749
764
|
function Box({ is = "div", ...props }) {
|
|
750
765
|
let propsWithStringClassName = useArrayLikeClassNameProp(props);
|
|
@@ -884,10 +899,11 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
884
899
|
});
|
|
885
900
|
}, [propVisibility]);
|
|
886
901
|
const className = useStyle(_rocket_chat_css_in_js.css`
|
|
887
|
-
|
|
902
|
+
animation-duration: 230ms;
|
|
903
|
+
animation-fill-mode: both;
|
|
888
904
|
|
|
889
|
-
|
|
890
|
-
|
|
905
|
+
${visibility === AnimatedVisibility.HIDING && _rocket_chat_css_in_js.css`
|
|
906
|
+
animation-name: ${_rocket_chat_css_in_js.keyframes`
|
|
891
907
|
from {
|
|
892
908
|
transform: translate3d(0, 0, 0);
|
|
893
909
|
opacity: 1;
|
|
@@ -898,10 +914,10 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
898
914
|
opacity: 0;
|
|
899
915
|
}
|
|
900
916
|
`};
|
|
901
|
-
|
|
917
|
+
`}
|
|
902
918
|
|
|
903
|
-
|
|
904
|
-
|
|
919
|
+
${visibility === AnimatedVisibility.UNHIDING && _rocket_chat_css_in_js.css`
|
|
920
|
+
animation-name: ${_rocket_chat_css_in_js.keyframes`
|
|
905
921
|
from {
|
|
906
922
|
transform: translate3d(0, 1rem, 0);
|
|
907
923
|
opacity: 0;
|
|
@@ -912,8 +928,8 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
912
928
|
opacity: 1;
|
|
913
929
|
}
|
|
914
930
|
`};
|
|
915
|
-
|
|
916
|
-
|
|
931
|
+
`}
|
|
932
|
+
`, null);
|
|
917
933
|
const handleAnimationEnd = (0, react.useCallback)(() => setVisibility((visibility) => {
|
|
918
934
|
if (visibility === AnimatedVisibility.HIDING) return AnimatedVisibility.HIDDEN;
|
|
919
935
|
if (visibility === AnimatedVisibility.UNHIDING) return AnimatedVisibility.VISIBLE;
|
|
@@ -964,12 +980,12 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
964
980
|
//#region src/components/Slider/SliderHead.tsx
|
|
965
981
|
var SliderHead = ({ state, labelProps, outputProps, label, showOutput = true, multiThumb }) => {
|
|
966
982
|
const labelContainer = useStyle(_rocket_chat_css_in_js.css`
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
983
|
+
display: flex;
|
|
984
|
+
justify-content: space-between;
|
|
985
|
+
${state.orientation === "vertical" && _rocket_chat_css_in_js.css`
|
|
986
|
+
flex-direction: column;
|
|
987
|
+
`}
|
|
988
|
+
`, null);
|
|
973
989
|
const output = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Label, {
|
|
974
990
|
...outputProps,
|
|
975
991
|
children: multiThumb ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Label, {
|
|
@@ -1002,18 +1018,18 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
1002
1018
|
}, state);
|
|
1003
1019
|
const { focusProps, isFocusVisible } = (0, react_aria.useFocusRing)();
|
|
1004
1020
|
const thumb = useStyle(_rocket_chat_css_in_js.css`
|
|
1005
|
-
|
|
1006
|
-
|
|
1021
|
+
width: 12px;
|
|
1022
|
+
height: 12px;
|
|
1007
1023
|
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1024
|
+
cursor: ${state.isDisabled ? "not-allowed" : "pointer"};
|
|
1025
|
+
border-radius: 50%;
|
|
1026
|
+
background: ${isFocusVisible || isDragging ? Palette.text["font-info"] : Palette.stroke["stroke-highlight"]};
|
|
1027
|
+
${state.orientation === "horizontal" ? _rocket_chat_css_in_js.css`
|
|
1028
|
+
top: 50%;
|
|
1029
|
+
` : _rocket_chat_css_in_js.css`
|
|
1030
|
+
left: 50%;
|
|
1031
|
+
`}
|
|
1032
|
+
`, {
|
|
1017
1033
|
isFocusVisible,
|
|
1018
1034
|
isDragging
|
|
1019
1035
|
});
|
|
@@ -1041,39 +1057,39 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
1041
1057
|
if (isVertical) return multiThumb ? `to top, ${light$1} ${getThumbPosition(state.values[0])}%, ${highlight} 0, ${highlight} ${getThumbPosition(state.values[1])}%, ${light$1} 0` : `to top, ${highlight} ${getThumbPosition(state.values[0])}%, ${light$1} 0%`;
|
|
1042
1058
|
};
|
|
1043
1059
|
const track = useStyle(_rocket_chat_css_in_js.css`
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1060
|
+
&::before {
|
|
1061
|
+
position: absolute;
|
|
1062
|
+
display: block;
|
|
1063
|
+
content: '';
|
|
1048
1064
|
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1065
|
+
background: linear-gradient(${getTrackGradient()});
|
|
1066
|
+
transform: translateX(-50%);
|
|
1067
|
+
border-radius: 1rem;
|
|
1068
|
+
}
|
|
1069
|
+
${isHorizontal && _rocket_chat_css_in_js.css`
|
|
1070
|
+
width: 100%;
|
|
1071
|
+
height: 30px;
|
|
1072
|
+
&::before {
|
|
1073
|
+
top: 50%;
|
|
1074
|
+
width: 100%;
|
|
1075
|
+
height: 4px;
|
|
1076
|
+
transform: translateY(-50%);
|
|
1077
|
+
}
|
|
1078
|
+
`};
|
|
1079
|
+
${isVertical && _rocket_chat_css_in_js.css`
|
|
1080
|
+
width: 30px;
|
|
1081
|
+
height: 100%;
|
|
1082
|
+
&::before {
|
|
1083
|
+
left: 50%;
|
|
1084
|
+
width: 4px;
|
|
1085
|
+
height: 100%;
|
|
1086
|
+
}
|
|
1087
|
+
`};
|
|
1088
|
+
${state.isDisabled && _rocket_chat_css_in_js.css`
|
|
1089
|
+
cursor: not-allowed;
|
|
1090
|
+
opacity: 0.4;
|
|
1091
|
+
`};
|
|
1092
|
+
`, state);
|
|
1077
1093
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1078
1094
|
...trackProps,
|
|
1079
1095
|
ref: trackRef,
|
|
@@ -1109,16 +1125,16 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
1109
1125
|
const isHorizontal = (0, react.useMemo)(() => sliderState.orientation === "horizontal", [sliderState.orientation]);
|
|
1110
1126
|
const isVertical = (0, react.useMemo)(() => sliderState.orientation === "vertical", [sliderState.orientation]);
|
|
1111
1127
|
const slider = useStyle(_rocket_chat_css_in_js.css`
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1128
|
+
display: flex;
|
|
1129
|
+
${isHorizontal && _rocket_chat_css_in_js.css`
|
|
1130
|
+
flex-direction: column;
|
|
1131
|
+
width: 100%;
|
|
1132
|
+
`};
|
|
1133
|
+
${isVertical && _rocket_chat_css_in_js.css`
|
|
1134
|
+
flex-direction: row-reverse;
|
|
1135
|
+
height: 100%;
|
|
1136
|
+
`}
|
|
1137
|
+
`, sliderState);
|
|
1122
1138
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1123
1139
|
...groupProps,
|
|
1124
1140
|
ref,
|
|
@@ -1169,8 +1185,12 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
1169
1185
|
"aria-label": isPlaying ? pauseLabel : playLabel,
|
|
1170
1186
|
icon: isPlaying ? "pause-shape-filled" : "play-shape-filled"
|
|
1171
1187
|
}),
|
|
1172
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
1173
|
-
|
|
1188
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Box_default, {
|
|
1189
|
+
display: "flex",
|
|
1190
|
+
alignItems: "center",
|
|
1191
|
+
flexGrow: 1,
|
|
1192
|
+
marginInline: 8,
|
|
1193
|
+
gap: 16,
|
|
1174
1194
|
children: [
|
|
1175
1195
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
1176
1196
|
fontScale: "p2",
|
|
@@ -1439,30 +1459,30 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
1439
1459
|
inlineStart
|
|
1440
1460
|
]);
|
|
1441
1461
|
const marginsClassName = useStyle(_rocket_chat_css_in_js.css`
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1462
|
+
&:not(.rcx-box--full) {
|
|
1463
|
+
${props.all && _rocket_chat_css_in_js.css`
|
|
1464
|
+
margin: ${spacing(props.all)};
|
|
1465
|
+
`}
|
|
1466
|
+
${props.inline && _rocket_chat_css_in_js.css`
|
|
1467
|
+
margin-inline: ${spacing(props.inline)};
|
|
1468
|
+
`}
|
|
1449
1469
|
${props.inlineStart && _rocket_chat_css_in_js.css`
|
|
1450
|
-
|
|
1451
|
-
|
|
1470
|
+
margin-inline-start: ${spacing(props.inlineStart)};
|
|
1471
|
+
`}
|
|
1452
1472
|
${props.inlineEnd && _rocket_chat_css_in_js.css`
|
|
1453
|
-
|
|
1454
|
-
|
|
1473
|
+
margin-inline-end: ${spacing(props.inlineEnd)};
|
|
1474
|
+
`}
|
|
1455
1475
|
${props.block && _rocket_chat_css_in_js.css`
|
|
1456
|
-
|
|
1457
|
-
|
|
1476
|
+
margin-block: ${spacing(props.block)};
|
|
1477
|
+
`}
|
|
1458
1478
|
${props.blockStart && _rocket_chat_css_in_js.css`
|
|
1459
|
-
|
|
1460
|
-
|
|
1479
|
+
margin-block-start: ${spacing(props.blockStart)};
|
|
1480
|
+
`}
|
|
1461
1481
|
${props.blockEnd && _rocket_chat_css_in_js.css`
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1482
|
+
margin-block-end: ${spacing(props.blockEnd)};
|
|
1483
|
+
`}
|
|
1484
|
+
}
|
|
1485
|
+
`, props);
|
|
1466
1486
|
const patchedChildren = patchChildren(children, (childProps) => ({ className: appendClassName(childProps.className, appendClassName(className, marginsClassName)) }));
|
|
1467
1487
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BoxTransforms.Provider, {
|
|
1468
1488
|
value: useComposedBoxTransform(transformFn),
|
|
@@ -1482,23 +1502,23 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
1482
1502
|
name: "cross",
|
|
1483
1503
|
size: "x16"
|
|
1484
1504
|
});
|
|
1485
|
-
var Chip = ({ children, className, thumbUrl, onClick, onMouseDown, renderThumb = defaultRenderThumb, renderDismissSymbol = defaultRenderDismissSymbol, ...rest }) => {
|
|
1505
|
+
var Chip = ({ children, className, thumbUrl, onClick, onMouseDown, renderThumb = defaultRenderThumb, renderDismissSymbol = defaultRenderDismissSymbol, small, label, ...rest }) => {
|
|
1486
1506
|
const onDismiss = onClick || onMouseDown;
|
|
1487
1507
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1488
1508
|
type: "button",
|
|
1489
|
-
className: prependClassName(className,
|
|
1509
|
+
className: prependClassName(className, `rcx-box rcx-chip${small ? " rcx-chip--small" : ""}${label ? " rcx-chip--label" : ""}`),
|
|
1490
1510
|
disabled: !onDismiss,
|
|
1491
1511
|
onClick: onDismiss,
|
|
1492
1512
|
...rest,
|
|
1493
1513
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Margins, {
|
|
1494
1514
|
all: "x4",
|
|
1495
1515
|
children: [
|
|
1496
|
-
thumbUrl && renderThumb
|
|
1516
|
+
thumbUrl && renderThumb?.({ url: thumbUrl }),
|
|
1497
1517
|
children && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1498
1518
|
className: "rcx-box rcx-chip__text",
|
|
1499
1519
|
children
|
|
1500
1520
|
}),
|
|
1501
|
-
onDismiss && renderDismissSymbol
|
|
1521
|
+
onDismiss && renderDismissSymbol?.()
|
|
1502
1522
|
]
|
|
1503
1523
|
})
|
|
1504
1524
|
});
|
|
@@ -1542,7 +1562,7 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
1542
1562
|
* Usually you'll perfer to use `-Input` (e.g. <LinkTo kind='Forms/TextInput' story='Default'>`TextInput`</LinkTo>)
|
|
1543
1563
|
* components over this one because it works as a construction block for them.
|
|
1544
1564
|
*/
|
|
1545
|
-
function InputBox({ ref, className, startAddon, endAddon, error, hidden, invisible, multiple, placeholderVisible, type = "text", small, onChange, ...props }) {
|
|
1565
|
+
function InputBox({ ref, className, startAddon, endAddon, endAddonFlush, error, hidden, invisible, multiple, placeholderVisible, type = "text", small, onChange, ...props }) {
|
|
1546
1566
|
const innerRef = (0, react.useRef)(null);
|
|
1547
1567
|
const mergedRef = (0, _rocket_chat_fuselage_hooks.useMergedRefs)(ref, innerRef);
|
|
1548
1568
|
let defaultAddon = endAddon;
|
|
@@ -1585,9 +1605,10 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
1585
1605
|
...props
|
|
1586
1606
|
});
|
|
1587
1607
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(InputBoxWrapper, {
|
|
1588
|
-
className: [props.disabled && "disabled",
|
|
1608
|
+
className: [props.disabled && "disabled", className].filter(Boolean).join(" "),
|
|
1589
1609
|
hidden,
|
|
1590
1610
|
invisible,
|
|
1611
|
+
"rcx-input-box__wrapper--end-addon-flush": endAddonFlush,
|
|
1591
1612
|
children: [
|
|
1592
1613
|
startAddon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InputBoxAddon, { children: startAddon }),
|
|
1593
1614
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Input, {
|
|
@@ -1612,12 +1633,13 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
1612
1633
|
}
|
|
1613
1634
|
//#endregion
|
|
1614
1635
|
//#region src/components/Skeleton/Skeleton.tsx
|
|
1615
|
-
var Skeleton = ({ variant = "text", ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StylingBox, {
|
|
1636
|
+
var Skeleton = ({ variant = "text", inverted, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StylingBox, {
|
|
1616
1637
|
...props,
|
|
1617
1638
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: cx(cxx("rcx-skeleton")({
|
|
1618
1639
|
text: variant === "text",
|
|
1619
1640
|
rect: variant === "rect",
|
|
1620
|
-
circle: variant === "circle"
|
|
1641
|
+
circle: variant === "circle",
|
|
1642
|
+
inverted: !!inverted
|
|
1621
1643
|
})) })
|
|
1622
1644
|
});
|
|
1623
1645
|
//#endregion
|
|
@@ -1635,6 +1657,286 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
1635
1657
|
event.nativeEvent.stopImmediatePropagation();
|
|
1636
1658
|
};
|
|
1637
1659
|
//#endregion
|
|
1660
|
+
//#region src/components/Item/ItemContext.ts
|
|
1661
|
+
var ItemContext = (0, react.createContext)({
|
|
1662
|
+
descriptionIds: [],
|
|
1663
|
+
registerDescription: () => () => void 0,
|
|
1664
|
+
registerTitle: () => () => void 0
|
|
1665
|
+
});
|
|
1666
|
+
var useItemContext = () => (0, react.useContext)(ItemContext);
|
|
1667
|
+
//#endregion
|
|
1668
|
+
//#region src/components/Item/useIdRegistry.ts
|
|
1669
|
+
/**
|
|
1670
|
+
* Collects the ids that descendants announce, so a parent can reference them
|
|
1671
|
+
* in ARIA relationships without the consumer wiring ids by hand.
|
|
1672
|
+
*/
|
|
1673
|
+
var useIdRegistry = () => {
|
|
1674
|
+
const [ids, setIds] = (0, react.useState)([]);
|
|
1675
|
+
return [ids, (0, react.useCallback)((id) => {
|
|
1676
|
+
setIds((prev) => prev.includes(id) ? prev : [...prev, id]);
|
|
1677
|
+
return () => {
|
|
1678
|
+
setIds((prev) => prev.filter((value) => value !== id));
|
|
1679
|
+
};
|
|
1680
|
+
}, [])];
|
|
1681
|
+
};
|
|
1682
|
+
//#endregion
|
|
1683
|
+
//#region src/components/Item/Item.tsx
|
|
1684
|
+
/**
|
|
1685
|
+
* A list row composed from slots: media, icon, content and actions.
|
|
1686
|
+
*/
|
|
1687
|
+
var Item = ({ is: Tag = "div", inset = "none", selected, highlighted, focused, focusVisible, disabled, variant, className, onClick, children, ...props }) => {
|
|
1688
|
+
const [descriptionIds, registerDescription] = useIdRegistry();
|
|
1689
|
+
const [titleIds, registerTitle] = useIdRegistry();
|
|
1690
|
+
const contextValue = (0, react.useMemo)(() => ({
|
|
1691
|
+
descriptionIds,
|
|
1692
|
+
registerDescription,
|
|
1693
|
+
registerTitle
|
|
1694
|
+
}), [
|
|
1695
|
+
descriptionIds,
|
|
1696
|
+
registerDescription,
|
|
1697
|
+
registerTitle
|
|
1698
|
+
]);
|
|
1699
|
+
const isMenuItem = !!props.role?.startsWith("menuitem");
|
|
1700
|
+
const ariaLabelledBy = isMenuItem ? props["aria-labelledby"] ?? (titleIds.join(" ") || void 0) : props["aria-labelledby"];
|
|
1701
|
+
const ariaDescribedBy = isMenuItem ? [props["aria-describedby"], ...descriptionIds].filter(Boolean).join(" ") || void 0 : props["aria-describedby"];
|
|
1702
|
+
const handleClick = onClick ? (event) => {
|
|
1703
|
+
if (disabled) return;
|
|
1704
|
+
onClick(event);
|
|
1705
|
+
} : void 0;
|
|
1706
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemContext.Provider, {
|
|
1707
|
+
value: contextValue,
|
|
1708
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Tag, {
|
|
1709
|
+
...props,
|
|
1710
|
+
"aria-labelledby": ariaLabelledBy,
|
|
1711
|
+
"aria-describedby": ariaDescribedBy,
|
|
1712
|
+
className: cx(cxx("rcx-item")({
|
|
1713
|
+
[`inset-${inset}`]: inset !== "none",
|
|
1714
|
+
"clickable": !!onClick,
|
|
1715
|
+
"selected": !!selected,
|
|
1716
|
+
"highlighted": !!highlighted,
|
|
1717
|
+
"focused": !!focused,
|
|
1718
|
+
"focus-managed": focusVisible !== void 0,
|
|
1719
|
+
"focus-visible": !!focusVisible,
|
|
1720
|
+
"disabled": !!disabled,
|
|
1721
|
+
"danger": variant === "danger"
|
|
1722
|
+
}), className),
|
|
1723
|
+
onClick: handleClick,
|
|
1724
|
+
children
|
|
1725
|
+
})
|
|
1726
|
+
});
|
|
1727
|
+
};
|
|
1728
|
+
//#endregion
|
|
1729
|
+
//#region src/components/Item/ItemActions.tsx
|
|
1730
|
+
/**
|
|
1731
|
+
* The trailing buttons, icon buttons or menu trigger of an `Item` or `ItemGroupHeader`.
|
|
1732
|
+
* Placed as a direct child it spans every row; placed inside an `ItemRow` it only takes space from that row.
|
|
1733
|
+
*/
|
|
1734
|
+
var ItemActions = ({ is: Tag = "div", reveal = "always", className, children, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Tag, {
|
|
1735
|
+
...props,
|
|
1736
|
+
className: cx(cxx("rcx-item__actions")({ "reveal-hover": reveal === "hover" }), className),
|
|
1737
|
+
children: reveal === "hover" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1738
|
+
className: "rcx-item__actions-inner",
|
|
1739
|
+
children
|
|
1740
|
+
}) : children
|
|
1741
|
+
});
|
|
1742
|
+
//#endregion
|
|
1743
|
+
//#region src/components/Item/ItemContent.tsx
|
|
1744
|
+
/**
|
|
1745
|
+
* The flexible, truncating column that holds the title and description, or one `ItemRow` per line.
|
|
1746
|
+
*/
|
|
1747
|
+
var ItemContent = ({ is: Tag = "div", className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Tag, {
|
|
1748
|
+
...props,
|
|
1749
|
+
className: cx("rcx-item__content", className)
|
|
1750
|
+
});
|
|
1751
|
+
//#endregion
|
|
1752
|
+
//#region src/components/Item/ItemDescription.tsx
|
|
1753
|
+
/**
|
|
1754
|
+
* The secondary line of an `Item`, such as a last message preview or a username.
|
|
1755
|
+
*/
|
|
1756
|
+
var ItemDescription = ({ is, inline, className, ...props }) => {
|
|
1757
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(is ?? (inline ? "span" : "div"), {
|
|
1758
|
+
...props,
|
|
1759
|
+
className: cx(cxx("rcx-item__description")({ inline: !!inline }), className)
|
|
1760
|
+
});
|
|
1761
|
+
};
|
|
1762
|
+
//#endregion
|
|
1763
|
+
//#region src/components/Item/ItemDivider.tsx
|
|
1764
|
+
/**
|
|
1765
|
+
* The divider between groups, menu sections, or a header and its rows.
|
|
1766
|
+
*/
|
|
1767
|
+
var ItemDivider = ({ is: Tag = "div", inset = "none", className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Tag, {
|
|
1768
|
+
...props,
|
|
1769
|
+
className: cx(cxx("rcx-item-divider")({ [`inset-${inset}`]: inset !== "none" }), className)
|
|
1770
|
+
});
|
|
1771
|
+
//#endregion
|
|
1772
|
+
//#region src/components/Item/ItemGroupContext.ts
|
|
1773
|
+
var ItemGroupContext = (0, react.createContext)({ registerTitle: () => () => void 0 });
|
|
1774
|
+
var useItemGroupContext = () => (0, react.useContext)(ItemGroupContext);
|
|
1775
|
+
//#endregion
|
|
1776
|
+
//#region src/components/Item/ItemGroup.tsx
|
|
1777
|
+
/**
|
|
1778
|
+
* A list of `Item` rows. An `ItemGroupTitle` inside it labels the group, and its width drives the narrow layout.
|
|
1779
|
+
*/
|
|
1780
|
+
var ItemGroup = ({ is: Tag = "div", className, children, ...props }) => {
|
|
1781
|
+
const [titleIds, registerTitle] = useIdRegistry();
|
|
1782
|
+
const contextValue = (0, react.useMemo)(() => ({ registerTitle }), [registerTitle]);
|
|
1783
|
+
const ariaLabelledBy = !(!!props["aria-label"] || !!props["aria-labelledby"]) && titleIds.length > 0 ? titleIds.join(" ") : void 0;
|
|
1784
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemGroupContext.Provider, {
|
|
1785
|
+
value: contextValue,
|
|
1786
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Tag, {
|
|
1787
|
+
"aria-labelledby": ariaLabelledBy,
|
|
1788
|
+
...props,
|
|
1789
|
+
className: cx("rcx-item-group", className),
|
|
1790
|
+
children
|
|
1791
|
+
})
|
|
1792
|
+
});
|
|
1793
|
+
};
|
|
1794
|
+
//#endregion
|
|
1795
|
+
//#region src/components/Item/ItemGroupHeader.tsx
|
|
1796
|
+
/**
|
|
1797
|
+
* The label row of a group, such as Favorites, Recent or Moderators. It holds an `ItemGroupTitle` and optional trailing content.
|
|
1798
|
+
*/
|
|
1799
|
+
var ItemGroupHeader = ({ is: Tag = "div", inset = "none", sticky, className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Tag, {
|
|
1800
|
+
...props,
|
|
1801
|
+
className: cx(cxx("rcx-item-group-header")({
|
|
1802
|
+
[`inset-${inset}`]: inset !== "none",
|
|
1803
|
+
sticky: !!sticky
|
|
1804
|
+
}), className)
|
|
1805
|
+
});
|
|
1806
|
+
//#endregion
|
|
1807
|
+
//#region src/components/Item/ItemGroupTitle.tsx
|
|
1808
|
+
/**
|
|
1809
|
+
* The text of an `ItemGroupHeader`. Inside an `ItemGroup`, it becomes the group's accessible name.
|
|
1810
|
+
*/
|
|
1811
|
+
var ItemGroupTitle = ({ is: Tag = "div", id: propId, className, type, ...props }) => {
|
|
1812
|
+
const generatedId = (0, react.useId)();
|
|
1813
|
+
const id = propId ?? generatedId;
|
|
1814
|
+
const { registerTitle } = useItemGroupContext();
|
|
1815
|
+
(0, react.useEffect)(() => registerTitle(id), [id, registerTitle]);
|
|
1816
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Tag, {
|
|
1817
|
+
...props,
|
|
1818
|
+
type: Tag === "button" ? type ?? "button" : type,
|
|
1819
|
+
id,
|
|
1820
|
+
className: cx("rcx-item-group-title", className)
|
|
1821
|
+
});
|
|
1822
|
+
};
|
|
1823
|
+
//#endregion
|
|
1824
|
+
//#region src/components/Item/ItemIcon.tsx
|
|
1825
|
+
/**
|
|
1826
|
+
* A 20px slot for the room type icon or a user status, placed before the title.
|
|
1827
|
+
*/
|
|
1828
|
+
var ItemIcon = ({ is: Tag = "div", label, id: propId, className, ...props }) => {
|
|
1829
|
+
const generatedId = (0, react.useId)();
|
|
1830
|
+
const id = propId ?? generatedId;
|
|
1831
|
+
const { registerDescription } = useItemContext();
|
|
1832
|
+
(0, react.useEffect)(() => {
|
|
1833
|
+
if (!label) return;
|
|
1834
|
+
return registerDescription(id);
|
|
1835
|
+
}, [
|
|
1836
|
+
id,
|
|
1837
|
+
label,
|
|
1838
|
+
registerDescription
|
|
1839
|
+
]);
|
|
1840
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Tag, {
|
|
1841
|
+
...label ? {
|
|
1842
|
+
"role": "img",
|
|
1843
|
+
"aria-label": label
|
|
1844
|
+
} : { "aria-hidden": true },
|
|
1845
|
+
...props,
|
|
1846
|
+
id,
|
|
1847
|
+
className: cx("rcx-item__icon", className)
|
|
1848
|
+
});
|
|
1849
|
+
};
|
|
1850
|
+
//#endregion
|
|
1851
|
+
//#region src/components/Item/ItemLink.tsx
|
|
1852
|
+
/**
|
|
1853
|
+
* The primary target of an `Item`. It covers the whole row, so actions sit beside it instead of inside it.
|
|
1854
|
+
*/
|
|
1855
|
+
var ItemLink = (props) => {
|
|
1856
|
+
const { descriptionIds } = useItemContext();
|
|
1857
|
+
const ariaDescribedBy = [props["aria-describedby"], ...descriptionIds].filter(Boolean).join(" ") || void 0;
|
|
1858
|
+
if (props.is === "button") {
|
|
1859
|
+
const { is: _is, className, type = "button", ...rest } = props;
|
|
1860
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1861
|
+
...rest,
|
|
1862
|
+
type,
|
|
1863
|
+
"aria-describedby": ariaDescribedBy,
|
|
1864
|
+
className: cx("rcx-item__link", className)
|
|
1865
|
+
});
|
|
1866
|
+
}
|
|
1867
|
+
const { is: _is, className, children, ...rest } = props;
|
|
1868
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
1869
|
+
...rest,
|
|
1870
|
+
"aria-describedby": ariaDescribedBy,
|
|
1871
|
+
className: cx("rcx-item__link", className),
|
|
1872
|
+
children
|
|
1873
|
+
});
|
|
1874
|
+
};
|
|
1875
|
+
//#endregion
|
|
1876
|
+
//#region src/components/Item/ItemMedia.tsx
|
|
1877
|
+
/**
|
|
1878
|
+
* The leading avatar, icon or thumbnail of an `Item`. Its box fits its child, so the child's size sets the row height.
|
|
1879
|
+
*/
|
|
1880
|
+
var ItemMedia = ({ is: Tag = "div", variant = "default", className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Tag, {
|
|
1881
|
+
...props,
|
|
1882
|
+
className: cx(cxx("rcx-item__media")({ icon: variant === "icon" }), className)
|
|
1883
|
+
});
|
|
1884
|
+
//#endregion
|
|
1885
|
+
//#region src/components/Item/ItemMeta.tsx
|
|
1886
|
+
/**
|
|
1887
|
+
* Short trailing text, such as a timestamp, count or file size. It never truncates unless `truncate` is set.
|
|
1888
|
+
*/
|
|
1889
|
+
var ItemMeta = ({ is: Tag = "div", truncate, className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Tag, {
|
|
1890
|
+
...props,
|
|
1891
|
+
className: cx(cxx("rcx-item__meta")({ truncate: !!truncate }), className)
|
|
1892
|
+
});
|
|
1893
|
+
//#endregion
|
|
1894
|
+
//#region src/components/Item/ItemRow.tsx
|
|
1895
|
+
/**
|
|
1896
|
+
* A horizontal line inside `ItemContent`, such as a title with a timestamp or a description with a badge.
|
|
1897
|
+
*/
|
|
1898
|
+
var ItemRow = ({ is: Tag = "div", className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Tag, {
|
|
1899
|
+
...props,
|
|
1900
|
+
className: cx("rcx-item__row", className)
|
|
1901
|
+
});
|
|
1902
|
+
//#endregion
|
|
1903
|
+
//#region src/components/Item/ItemTitle.tsx
|
|
1904
|
+
/**
|
|
1905
|
+
* The main label of an `Item`. It truncates with an ellipsis.
|
|
1906
|
+
*/
|
|
1907
|
+
var ItemTitle = ({ is: Tag = "div", id: propId, className, ...props }) => {
|
|
1908
|
+
const generatedId = (0, react.useId)();
|
|
1909
|
+
const id = propId ?? generatedId;
|
|
1910
|
+
const { registerTitle } = useItemContext();
|
|
1911
|
+
(0, react.useEffect)(() => registerTitle(id), [id, registerTitle]);
|
|
1912
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Tag, {
|
|
1913
|
+
...props,
|
|
1914
|
+
id,
|
|
1915
|
+
className: cx("rcx-item__title", className)
|
|
1916
|
+
});
|
|
1917
|
+
};
|
|
1918
|
+
//#endregion
|
|
1919
|
+
//#region src/components/Item/ItemSkeleton.tsx
|
|
1920
|
+
/**
|
|
1921
|
+
* A loading placeholder with the same height as an `Item` with the same media and lines.
|
|
1922
|
+
*/
|
|
1923
|
+
var ItemSkeleton = ({ is, inset, mediaSize = "x20", description = false }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Item, {
|
|
1924
|
+
is,
|
|
1925
|
+
inset,
|
|
1926
|
+
"aria-hidden": true,
|
|
1927
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemMedia, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Skeleton, {
|
|
1928
|
+
variant: "rect",
|
|
1929
|
+
width: mediaSize,
|
|
1930
|
+
height: mediaSize
|
|
1931
|
+
}) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(ItemContent, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemTitle, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Skeleton, {
|
|
1932
|
+
variant: "text",
|
|
1933
|
+
width: "60%"
|
|
1934
|
+
}) }), description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemDescription, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Skeleton, {
|
|
1935
|
+
variant: "text",
|
|
1936
|
+
width: "40%"
|
|
1937
|
+
}) })] })]
|
|
1938
|
+
});
|
|
1939
|
+
//#endregion
|
|
1638
1940
|
//#region src/components/CheckBox/CheckBox.tsx
|
|
1639
1941
|
function CheckBox({ ref, indeterminate, onChange, className, labelChildren, ...props }) {
|
|
1640
1942
|
const innerRef = (0, react.useRef)(null);
|
|
@@ -1669,88 +1971,108 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
1669
1971
|
"rcx-check-box__fake": true,
|
|
1670
1972
|
"aria-hidden": "true"
|
|
1671
1973
|
})
|
|
1672
|
-
]
|
|
1673
|
-
});
|
|
1674
|
-
}
|
|
1675
|
-
//#endregion
|
|
1676
|
-
//#region src/components/Option/OptionAvatar.tsx
|
|
1677
|
-
var OptionAvatar = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1678
|
-
className: "rcx-option__avatar",
|
|
1679
|
-
...props
|
|
1680
|
-
});
|
|
1681
|
-
//#endregion
|
|
1682
|
-
//#region src/components/Option/OptionColumn.tsx
|
|
1683
|
-
var OptionColumn = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1684
|
-
className: "rcx-option__column",
|
|
1685
|
-
...props
|
|
1686
|
-
});
|
|
1687
|
-
//#endregion
|
|
1688
|
-
//#region src/components/Option/OptionContent.tsx
|
|
1689
|
-
var OptionContent = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1690
|
-
className: "rcx-option__content",
|
|
1691
|
-
...props
|
|
1692
|
-
});
|
|
1693
|
-
//#endregion
|
|
1694
|
-
//#region src/components/Option/OptionIcon.tsx
|
|
1695
|
-
var OptionIcon = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OptionColumn, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
1696
|
-
size: "x20",
|
|
1697
|
-
"rcx-option__icon": true,
|
|
1698
|
-
...props
|
|
1699
|
-
}) });
|
|
1974
|
+
]
|
|
1975
|
+
});
|
|
1976
|
+
}
|
|
1700
1977
|
//#endregion
|
|
1701
1978
|
//#region src/components/Option/Option.tsx
|
|
1702
1979
|
/**
|
|
1703
1980
|
* The generic `Option` item of options. Can be freely used or inside the `Options` as well.
|
|
1981
|
+
*
|
|
1982
|
+
* It renders an `Item` row, so its content can also be composed from `Item` parts.
|
|
1704
1983
|
*/
|
|
1705
|
-
function Option({ is
|
|
1706
|
-
|
|
1984
|
+
function Option({ is = "li", children, label, focus, focusVisible, selected, className, icon, iconLabel, gap, avatar, disabled, variant, onClick, description, ...props }) {
|
|
1985
|
+
const { className: normalizedClassName } = useArrayLikeClassNameProp({ className });
|
|
1986
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Item, {
|
|
1707
1987
|
...props,
|
|
1708
|
-
|
|
1709
|
-
|
|
1988
|
+
ref: props.ref,
|
|
1989
|
+
is,
|
|
1990
|
+
inset: "md",
|
|
1991
|
+
focused: focus,
|
|
1992
|
+
focusVisible,
|
|
1993
|
+
selected,
|
|
1994
|
+
disabled,
|
|
1995
|
+
variant: variant === "danger" ? "danger" : void 0,
|
|
1710
1996
|
"aria-selected": !!selected,
|
|
1711
1997
|
"aria-disabled": !!disabled,
|
|
1712
|
-
|
|
1713
|
-
onClick: (
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
},
|
|
1720
|
-
className: [
|
|
1721
|
-
"rcx-option",
|
|
1722
|
-
className,
|
|
1723
|
-
focus && "rcx-option--focus",
|
|
1724
|
-
selected && "rcx-option--selected",
|
|
1725
|
-
disabled && "rcx-option--disabled",
|
|
1726
|
-
variant && `rcx-option--${variant}`
|
|
1727
|
-
].filter(Boolean).join(" ")
|
|
1728
|
-
}, /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1729
|
-
className: ["rcx-option__wrapper", !!description && "rcx-option__wrapper--align-top"].filter(Boolean).join(" "),
|
|
1998
|
+
onClickCapture: disabled ? prevent : void 0,
|
|
1999
|
+
onClick: (event) => onClick?.(event),
|
|
2000
|
+
className: cx(cxx("rcx-option")({
|
|
2001
|
+
"focus": !!focus,
|
|
2002
|
+
"selected": !!selected,
|
|
2003
|
+
"disabled": !!disabled,
|
|
2004
|
+
"align-top": !!description
|
|
2005
|
+
}, variant), normalizedClassName),
|
|
1730
2006
|
children: [
|
|
1731
|
-
avatar && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
2007
|
+
avatar && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemMedia, {
|
|
2008
|
+
className: "rcx-option__avatar",
|
|
2009
|
+
children: avatar
|
|
2010
|
+
}),
|
|
2011
|
+
icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemIcon, {
|
|
2012
|
+
className: "rcx-option__column",
|
|
2013
|
+
label: iconLabel,
|
|
2014
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
2015
|
+
name: icon,
|
|
2016
|
+
size: "x20",
|
|
2017
|
+
className: "rcx-option__icon"
|
|
2018
|
+
})
|
|
2019
|
+
}),
|
|
2020
|
+
gap && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemIcon, { className: "rcx-option__column" }),
|
|
2021
|
+
label && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemContent, {
|
|
2022
|
+
className: "rcx-option__content",
|
|
2023
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemTitle, { children: label })
|
|
2024
|
+
}),
|
|
1735
2025
|
label !== children && children
|
|
1736
2026
|
]
|
|
1737
|
-
})
|
|
2027
|
+
});
|
|
1738
2028
|
}
|
|
1739
2029
|
var Option_default = (0, react.memo)(Option);
|
|
1740
2030
|
//#endregion
|
|
1741
2031
|
//#region src/components/Option/CheckOption.tsx
|
|
1742
|
-
|
|
2032
|
+
/**
|
|
2033
|
+
* An `Option` with a checkbox. Its selection is announced through `aria-selected`, so the checkbox is hidden from assistive technology.
|
|
2034
|
+
*/
|
|
2035
|
+
var CheckOption = ({ selected, children: label, ...options }) => {
|
|
1743
2036
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Option_default, {
|
|
1744
2037
|
label,
|
|
1745
2038
|
selected,
|
|
1746
2039
|
...options,
|
|
1747
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CheckBox, {
|
|
2040
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CheckBox, {
|
|
2041
|
+
checked: !!selected,
|
|
2042
|
+
readOnly: true,
|
|
2043
|
+
tabIndex: -1,
|
|
2044
|
+
"aria-hidden": true,
|
|
2045
|
+
inert: true
|
|
2046
|
+
})
|
|
1748
2047
|
});
|
|
1749
2048
|
};
|
|
1750
|
-
var CheckOption_default = (0, react.memo)(CheckOption
|
|
2049
|
+
var CheckOption_default = (0, react.memo)(CheckOption);
|
|
2050
|
+
//#endregion
|
|
2051
|
+
//#region src/components/Option/OptionAvatar.tsx
|
|
2052
|
+
var OptionAvatar = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemMedia, {
|
|
2053
|
+
className: "rcx-option__avatar",
|
|
2054
|
+
...props
|
|
2055
|
+
});
|
|
2056
|
+
//#endregion
|
|
2057
|
+
//#region src/components/Option/OptionColumn.tsx
|
|
2058
|
+
/**
|
|
2059
|
+
* A slot of at least 20px for a status, an emoji or a short label. Empty, it lines up rows with and without icons.
|
|
2060
|
+
*/
|
|
2061
|
+
var OptionColumn = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemMedia, {
|
|
2062
|
+
className: "rcx-option__column",
|
|
2063
|
+
...props
|
|
2064
|
+
});
|
|
2065
|
+
//#endregion
|
|
2066
|
+
//#region src/components/Option/OptionContent.tsx
|
|
2067
|
+
var OptionContent = ({ className, children, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemContent, {
|
|
2068
|
+
...props,
|
|
2069
|
+
className: cx("rcx-option__content", className),
|
|
2070
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemTitle, { children })
|
|
2071
|
+
});
|
|
1751
2072
|
//#endregion
|
|
1752
2073
|
//#region src/components/Option/OptionDescription.tsx
|
|
1753
|
-
var OptionDescription = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2074
|
+
var OptionDescription = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemDescription, {
|
|
2075
|
+
inline: true,
|
|
1754
2076
|
className: "rcx-option__description",
|
|
1755
2077
|
...props
|
|
1756
2078
|
});
|
|
@@ -1762,16 +2084,21 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
1762
2084
|
});
|
|
1763
2085
|
//#endregion
|
|
1764
2086
|
//#region src/components/Divider/Divider.tsx
|
|
1765
|
-
var Divider = ({ variation, children, vertical, ...props }) => {
|
|
2087
|
+
var Divider = ({ variation, children, vertical, flush, small, stretch, ...props }) => {
|
|
1766
2088
|
if (!children) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
1767
2089
|
is: "hr",
|
|
1768
2090
|
"rcx-divider": true,
|
|
1769
2091
|
"rcx-divider--vertical": vertical,
|
|
2092
|
+
"rcx-divider--small": vertical && small,
|
|
2093
|
+
"rcx-divider--stretch": vertical && stretch,
|
|
2094
|
+
"rcx-divider--flush": flush,
|
|
1770
2095
|
"rcx-divider--danger": variation === "danger",
|
|
2096
|
+
"rcx-divider--light": variation === "light",
|
|
1771
2097
|
...props
|
|
1772
2098
|
});
|
|
1773
2099
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Box_default, {
|
|
1774
2100
|
"rcx-message-divider": true,
|
|
2101
|
+
"rcx-divider--labelled": true,
|
|
1775
2102
|
role: "separator",
|
|
1776
2103
|
...props,
|
|
1777
2104
|
children: [
|
|
@@ -1788,33 +2115,76 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
1788
2115
|
//#region src/components/Option/OptionDivider.tsx
|
|
1789
2116
|
var OptionDivider = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Divider, { ...props });
|
|
1790
2117
|
//#endregion
|
|
2118
|
+
//#region src/components/Option/OptionIcon.tsx
|
|
2119
|
+
var OptionIcon = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemIcon, {
|
|
2120
|
+
className: "rcx-option__column",
|
|
2121
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
2122
|
+
size: "x20",
|
|
2123
|
+
...props,
|
|
2124
|
+
className: ["rcx-option__icon", className].filter(Boolean).join(" ")
|
|
2125
|
+
})
|
|
2126
|
+
});
|
|
2127
|
+
//#endregion
|
|
1791
2128
|
//#region src/components/Option/OptionInput.tsx
|
|
1792
|
-
var OptionInput = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2129
|
+
var OptionInput = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemActions, {
|
|
1793
2130
|
className: "rcx-option__input",
|
|
1794
2131
|
...props
|
|
1795
2132
|
});
|
|
1796
2133
|
//#endregion
|
|
1797
2134
|
//#region src/components/Option/OptionMenu.tsx
|
|
1798
|
-
var OptionMenu = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1799
|
-
|
|
1800
|
-
|
|
2135
|
+
var OptionMenu = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemActions, {
|
|
2136
|
+
...props,
|
|
2137
|
+
reveal: "hover",
|
|
2138
|
+
className: cx("rcx-option__menu-wrapper", className)
|
|
1801
2139
|
});
|
|
1802
2140
|
//#endregion
|
|
1803
2141
|
//#region src/components/Option/OptionSkeleton.tsx
|
|
1804
|
-
var OptionSkeleton = () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Option_default, {
|
|
2142
|
+
var OptionSkeleton = () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Option_default, {
|
|
2143
|
+
"aria-hidden": true,
|
|
2144
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Skeleton, { width: "100%" })
|
|
2145
|
+
});
|
|
1805
2146
|
//#endregion
|
|
1806
2147
|
//#region src/components/Option/OptionTitle.tsx
|
|
1807
|
-
var OptionTitle = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2148
|
+
var OptionTitle = ({ children, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemGroupHeader, {
|
|
2149
|
+
...props,
|
|
2150
|
+
inset: "md",
|
|
1808
2151
|
className: "rcx-option__title",
|
|
1809
|
-
|
|
2152
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemGroupTitle, { children })
|
|
1810
2153
|
});
|
|
1811
2154
|
//#endregion
|
|
1812
2155
|
//#region src/components/Option/OptionHeader.tsx
|
|
1813
|
-
|
|
2156
|
+
/**
|
|
2157
|
+
* A group label inside an `Options` listbox. It is presentational, so the listbox only reports its options.
|
|
2158
|
+
*/
|
|
2159
|
+
var OptionHeader = ({ children }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemGroupHeader, {
|
|
2160
|
+
is: "li",
|
|
2161
|
+
role: "presentation",
|
|
2162
|
+
inset: "md",
|
|
1814
2163
|
className: "rcx-option__header",
|
|
1815
|
-
children
|
|
2164
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemGroupTitle, { children })
|
|
1816
2165
|
});
|
|
1817
2166
|
//#endregion
|
|
2167
|
+
//#region src/components/PopoverSurface/PopoverSurface.tsx
|
|
2168
|
+
var maxHeights = {
|
|
2169
|
+
"half-screen": "50vh",
|
|
2170
|
+
"most-of-screen": "80vh"
|
|
2171
|
+
};
|
|
2172
|
+
/**
|
|
2173
|
+
* The raised surface of a dropdown or popover: it fills its positioner and scrolls its content.
|
|
2174
|
+
*/
|
|
2175
|
+
function PopoverSurface({ maxHeight, flush, elevation = "2", ...props }) {
|
|
2176
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
2177
|
+
"rcx-tile": true,
|
|
2178
|
+
"rcx-tile--elevation": elevation,
|
|
2179
|
+
display: "flex",
|
|
2180
|
+
flexDirection: "column",
|
|
2181
|
+
overflow: "auto",
|
|
2182
|
+
paddingBlock: flush ? void 0 : 12,
|
|
2183
|
+
maxHeight: maxHeight && maxHeights[maxHeight],
|
|
2184
|
+
...props
|
|
2185
|
+
});
|
|
2186
|
+
}
|
|
2187
|
+
//#endregion
|
|
1818
2188
|
//#region src/components/Scrollable/Scrollable.tsx
|
|
1819
2189
|
var getTouchingEdges = (element) => ({
|
|
1820
2190
|
top: !element.scrollTop,
|
|
@@ -1825,7 +2195,7 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
1825
2195
|
var pollTouchingEdges = (element, touchingEdgesRef, onScrollContent) => {
|
|
1826
2196
|
const touchingEdges = touchingEdgesRef.current;
|
|
1827
2197
|
const newTouchingEdges = getTouchingEdges(element);
|
|
1828
|
-
if (touchingEdges && (touchingEdges
|
|
2198
|
+
if (touchingEdges && (touchingEdges.top !== newTouchingEdges.top || touchingEdges.bottom !== newTouchingEdges.bottom || touchingEdges.left !== newTouchingEdges.left || touchingEdges.right !== newTouchingEdges.right)) {
|
|
1829
2199
|
touchingEdgesRef.current = newTouchingEdges;
|
|
1830
2200
|
onScrollContent?.(newTouchingEdges);
|
|
1831
2201
|
}
|
|
@@ -1846,44 +2216,38 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
1846
2216
|
}, 200);
|
|
1847
2217
|
});
|
|
1848
2218
|
const className = useStyle(_rocket_chat_css_in_js.css`
|
|
1849
|
-
|
|
2219
|
+
position: relative;
|
|
1850
2220
|
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
2221
|
+
&::-webkit-scrollbar {
|
|
2222
|
+
width: ${4 / 16}rem;
|
|
2223
|
+
height: ${4 / 16}rem;
|
|
2224
|
+
}
|
|
1855
2225
|
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
2226
|
+
&::-webkit-scrollbar-track {
|
|
2227
|
+
background-color: transparent;
|
|
2228
|
+
}
|
|
1859
2229
|
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
rgba(0, 0, 0, 0.05)
|
|
1865
|
-
);
|
|
1866
|
-
}
|
|
2230
|
+
&::-webkit-scrollbar-thumb {
|
|
2231
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
2232
|
+
background-color: var(--rcx-theme-scrollbar-thumb-color, rgba(0, 0, 0, 0.05));
|
|
2233
|
+
}
|
|
1867
2234
|
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
rgba(0, 0, 0, 0.15)
|
|
1873
|
-
);
|
|
1874
|
-
}
|
|
2235
|
+
&:hover::-webkit-scrollbar-thumb {
|
|
2236
|
+
background-color: rgba(0, 0, 0, 0.15);
|
|
2237
|
+
background-color: var(--rcx-theme-scrollbar-thumb-hover-color, rgba(0, 0, 0, 0.15));
|
|
2238
|
+
}
|
|
1875
2239
|
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
2240
|
+
${horizontal && _rocket_chat_css_in_js.css`
|
|
2241
|
+
overflow-x: auto !important;
|
|
2242
|
+
` || vertical && _rocket_chat_css_in_js.css`
|
|
2243
|
+
overflow-y: auto !important;
|
|
2244
|
+
` || _rocket_chat_css_in_js.css`
|
|
2245
|
+
overflow: auto !important;
|
|
2246
|
+
`}
|
|
2247
|
+
${smooth && _rocket_chat_css_in_js.css`
|
|
2248
|
+
scroll-behavior: smooth !important;
|
|
2249
|
+
`}
|
|
2250
|
+
`, null);
|
|
1887
2251
|
const transformFn = (0, react.useCallback)((props) => {
|
|
1888
2252
|
props.className = className && appendClassName(props.className, className);
|
|
1889
2253
|
if (onScrollContent !== void 0 && props.onScroll === void 0) props.onScroll = handleScroll;
|
|
@@ -1899,18 +2263,12 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
1899
2263
|
});
|
|
1900
2264
|
};
|
|
1901
2265
|
//#endregion
|
|
1902
|
-
//#region src/components/Tile/Tile.tsx
|
|
1903
|
-
function Tile({ elevation = "1", padding = 16, ...props }) {
|
|
1904
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
1905
|
-
"rcx-tile": true,
|
|
1906
|
-
"rcx-tile--elevation": elevation,
|
|
1907
|
-
padding,
|
|
1908
|
-
...props
|
|
1909
|
-
});
|
|
1910
|
-
}
|
|
1911
|
-
//#endregion
|
|
1912
2266
|
//#region src/components/Options/OptionsEmpty.tsx
|
|
1913
|
-
var OptionsEmpty = ({ customEmpty }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Option_default, {
|
|
2267
|
+
var OptionsEmpty = ({ customEmpty }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Option_default, {
|
|
2268
|
+
role: "option",
|
|
2269
|
+
disabled: true,
|
|
2270
|
+
label: customEmpty || "Empty"
|
|
2271
|
+
});
|
|
1914
2272
|
var OptionsEmpty_default = (0, react.memo)(OptionsEmpty);
|
|
1915
2273
|
//#endregion
|
|
1916
2274
|
//#region src/components/Options/Options.tsx
|
|
@@ -1922,14 +2280,17 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
1922
2280
|
(0, react.useLayoutEffect)(() => {
|
|
1923
2281
|
if (!liRef.current) return;
|
|
1924
2282
|
const { current } = liRef;
|
|
1925
|
-
const li = current?.querySelector(".rcx-option--focus");
|
|
2283
|
+
const li = current?.querySelector(".rcx-option--focus, .rcx-item--focused");
|
|
1926
2284
|
if (!li) return;
|
|
1927
2285
|
if (li.offsetTop + li.clientHeight > current.scrollTop + current.clientHeight || li.offsetTop - li.clientHeight < current.scrollTop) current.scrollTop = li.offsetTop;
|
|
1928
2286
|
}, [cursor]);
|
|
1929
2287
|
const optionsMemoized = (0, react.useMemo)(() => options.map(([value, label, selected, disabled, type, url], i) => {
|
|
1930
2288
|
switch (type) {
|
|
1931
2289
|
case "heading": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OptionHeader, { children: label }, value);
|
|
1932
|
-
case "divider": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2290
|
+
case "divider": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemDivider, {
|
|
2291
|
+
is: "li",
|
|
2292
|
+
"aria-hidden": true
|
|
2293
|
+
}, value);
|
|
1933
2294
|
default: return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OptionComponent, {
|
|
1934
2295
|
role: "option",
|
|
1935
2296
|
label,
|
|
@@ -1960,30 +2321,24 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
1960
2321
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
1961
2322
|
"rcx-options": true,
|
|
1962
2323
|
...props,
|
|
1963
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
"aria-multiselectable": multiple || true,
|
|
1980
|
-
role: "listbox",
|
|
1981
|
-
id,
|
|
1982
|
-
"aria-activedescendant": options?.[cursor]?.[0] ? String(options?.[cursor]?.[0]) : void 0,
|
|
1983
|
-
children: [!options.length && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmptyComponent, { customEmpty }), optionsMemoized]
|
|
1984
|
-
})
|
|
2324
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PopoverSurface, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Scrollable, {
|
|
2325
|
+
vertical: true,
|
|
2326
|
+
smooth: true,
|
|
2327
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Box_default, {
|
|
2328
|
+
ref: liRef,
|
|
2329
|
+
borderRadius: "medium",
|
|
2330
|
+
backgroundColor: "light",
|
|
2331
|
+
maxHeight,
|
|
2332
|
+
onMouseDown: prevent,
|
|
2333
|
+
onClick: prevent,
|
|
2334
|
+
is: "ol",
|
|
2335
|
+
"aria-multiselectable": multiple || true,
|
|
2336
|
+
role: "listbox",
|
|
2337
|
+
id,
|
|
2338
|
+
"aria-activedescendant": options?.[cursor]?.[0] ? String(options?.[cursor]?.[0]) : void 0,
|
|
2339
|
+
children: [!options.length && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmptyComponent, { customEmpty }), optionsMemoized]
|
|
1985
2340
|
})
|
|
1986
|
-
})
|
|
2341
|
+
}) })
|
|
1987
2342
|
});
|
|
1988
2343
|
}
|
|
1989
2344
|
//#endregion
|
|
@@ -1991,16 +2346,14 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
1991
2346
|
function OptionContainer(props) {
|
|
1992
2347
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
1993
2348
|
"rcx-options": true,
|
|
1994
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1995
|
-
|
|
1996
|
-
paddingBlock: "x12",
|
|
1997
|
-
paddingInline: 0,
|
|
2349
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PopoverSurface, {
|
|
2350
|
+
elevation: "1",
|
|
1998
2351
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Scrollable, {
|
|
1999
2352
|
vertical: true,
|
|
2000
2353
|
smooth: true,
|
|
2001
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2002
|
-
|
|
2003
|
-
|
|
2354
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
2355
|
+
borderRadius: "medium",
|
|
2356
|
+
backgroundColor: "light",
|
|
2004
2357
|
maxHeight: "x240",
|
|
2005
2358
|
...props
|
|
2006
2359
|
})
|
|
@@ -2110,12 +2463,13 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
2110
2463
|
};
|
|
2111
2464
|
//#endregion
|
|
2112
2465
|
//#region src/components/PositionAnimated/Position.tsx
|
|
2113
|
-
var Position = ({ anchor, children, placement, margin, className: _className, ...props }) => {
|
|
2466
|
+
var Position = ({ anchor, children, placement, margin, preventScroll = false, className: _className, ...props }) => {
|
|
2114
2467
|
const target = (0, react.useRef)(null);
|
|
2115
2468
|
const { style: positionStyle, placement: positionPlacement } = (0, _rocket_chat_fuselage_hooks.usePosition)(anchor, target, (0, react.useMemo)(() => ({
|
|
2116
2469
|
placement,
|
|
2117
2470
|
margin
|
|
2118
2471
|
}), [placement, margin])) || {};
|
|
2472
|
+
(0, _rocket_chat_fuselage_hooks.usePreventScrollOutside)(target, preventScroll);
|
|
2119
2473
|
const style = (0, react.useMemo)(() => ({
|
|
2120
2474
|
position: "fixed",
|
|
2121
2475
|
...positionStyle
|
|
@@ -2130,18 +2484,21 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
2130
2484
|
return element;
|
|
2131
2485
|
});
|
|
2132
2486
|
(0, react.useEffect)(() => () => {
|
|
2133
|
-
if (portalContainer.
|
|
2134
|
-
}, [portalContainer
|
|
2487
|
+
if (!portalContainer.hasChildNodes()) portalContainer.remove();
|
|
2488
|
+
}, [portalContainer]);
|
|
2135
2489
|
return (0, react_dom.createPortal)((0, react.cloneElement)(children, {
|
|
2136
2490
|
ref: target,
|
|
2137
|
-
style
|
|
2491
|
+
style: {
|
|
2492
|
+
...children.props.style,
|
|
2493
|
+
...style
|
|
2494
|
+
},
|
|
2138
2495
|
...props,
|
|
2139
2496
|
placement: positionPlacement
|
|
2140
2497
|
}), portalContainer);
|
|
2141
2498
|
};
|
|
2142
2499
|
//#endregion
|
|
2143
2500
|
//#region src/components/PositionAnimated/PositionAnimated.tsx
|
|
2144
|
-
var PositionAnimated = ({
|
|
2501
|
+
var PositionAnimated = ({ visible, children, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AnimatedVisibility, {
|
|
2145
2502
|
visibility: visible,
|
|
2146
2503
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Position, {
|
|
2147
2504
|
...props,
|
|
@@ -2212,55 +2569,54 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
2212
2569
|
flexGrow: 1,
|
|
2213
2570
|
className: (0, react.useMemo)(() => [error && "invalid", disabled && "disabled"], [error, disabled]),
|
|
2214
2571
|
children: [
|
|
2215
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
2572
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Box_default, {
|
|
2216
2573
|
display: "flex",
|
|
2217
2574
|
flexGrow: 1,
|
|
2218
2575
|
alignItems: "center",
|
|
2219
2576
|
flexWrap: "wrap",
|
|
2220
|
-
|
|
2577
|
+
gap: 4,
|
|
2221
2578
|
role: "group",
|
|
2222
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
})
|
|
2579
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Input, {
|
|
2580
|
+
ref: mergedRefs,
|
|
2581
|
+
onChange: (0, _rocket_chat_fuselage_hooks.useStableCallback)((e) => setFilter?.(e.currentTarget.value)),
|
|
2582
|
+
onBlur: handleOnBlur,
|
|
2583
|
+
onFocus: show,
|
|
2584
|
+
onKeyDown: handleKeyDown,
|
|
2585
|
+
placeholder: optionsAreVisible === AnimatedVisibility.HIDDEN || !value ? placeholder : void 0,
|
|
2586
|
+
value: filter,
|
|
2587
|
+
disabled,
|
|
2588
|
+
...props,
|
|
2589
|
+
className: [
|
|
2590
|
+
"rcx-input-box--undecorated",
|
|
2591
|
+
"rcx-autocomplete__input",
|
|
2592
|
+
props.className
|
|
2593
|
+
].filter(Boolean).join(" ")
|
|
2594
|
+
}), selected.map((itemSelected) => RenderSelected ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RenderSelected, {
|
|
2595
|
+
selected: itemSelected,
|
|
2596
|
+
onRemove: handleRemove
|
|
2597
|
+
}, itemSelected.value) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Chip_default, {
|
|
2598
|
+
value: itemSelected.value,
|
|
2599
|
+
onClick: handleRemove,
|
|
2600
|
+
children: itemSelected.label
|
|
2601
|
+
}, itemSelected.value))]
|
|
2245
2602
|
}),
|
|
2246
2603
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
2247
2604
|
"rcx-autocomplete__addon": true,
|
|
2605
|
+
color: "titles-labels",
|
|
2248
2606
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
2249
2607
|
name: optionsAreVisible === AnimatedVisibility.VISIBLE ? "cross" : "magnifier",
|
|
2250
|
-
size: "x20"
|
|
2251
|
-
color: "titles-labels"
|
|
2608
|
+
size: "x20"
|
|
2252
2609
|
})
|
|
2253
2610
|
}),
|
|
2254
2611
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PositionAnimated, {
|
|
2255
2612
|
visible: optionsAreVisible,
|
|
2256
2613
|
anchor: containerRef,
|
|
2257
2614
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Options, {
|
|
2258
|
-
width: borderBoxSize.inlineSize,
|
|
2615
|
+
style: { width: borderBoxSize.inlineSize },
|
|
2259
2616
|
onSelect: handleSelect,
|
|
2260
2617
|
renderItem,
|
|
2261
2618
|
renderEmpty,
|
|
2262
2619
|
cursor,
|
|
2263
|
-
value,
|
|
2264
2620
|
options: memoizedOptions
|
|
2265
2621
|
})
|
|
2266
2622
|
})
|
|
@@ -2284,7 +2640,7 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
2284
2640
|
/**
|
|
2285
2641
|
* Indicates an actionable user action.
|
|
2286
2642
|
*/
|
|
2287
|
-
function Button({ ref, variant, primary, secondary, danger, warning, success, external, icon, is = "button", rel: _rel, size, tiny, mini, small, medium, large, square, loading, disabled, children, ...props }) {
|
|
2643
|
+
function Button({ ref, variant, primary, secondary, danger, warning, success, external, icon, is = "button", rel: _rel, size, tiny, mini, small, medium, large, square, compact, loading, disabled, children, ...props }) {
|
|
2288
2644
|
const extraProps = is === "a" && {
|
|
2289
2645
|
rel: external ? "noopener noreferrer" : void 0,
|
|
2290
2646
|
target: external ? "_blank" : void 0
|
|
@@ -2304,13 +2660,13 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
2304
2660
|
const effectiveSize = size || mini && "mini" || tiny && "tiny" || small && "small" || medium && "medium" || large && "large" || void 0;
|
|
2305
2661
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
2306
2662
|
is,
|
|
2307
|
-
type: "button",
|
|
2308
2663
|
"rcx-button": true,
|
|
2309
2664
|
...kindAndVariantProps,
|
|
2310
2665
|
"rcx-button--small": effectiveSize === "small",
|
|
2311
2666
|
"rcx-button--medium": effectiveSize === "medium",
|
|
2312
2667
|
"rcx-button--large": effectiveSize === "large",
|
|
2313
2668
|
"rcx-button--square": square,
|
|
2669
|
+
"rcx-button--compact": compact,
|
|
2314
2670
|
"rcx-button--tiny-square": effectiveSize === "tiny" && square,
|
|
2315
2671
|
"rcx-button--mini-square": effectiveSize === "mini" && square,
|
|
2316
2672
|
"rcx-button--small-square": effectiveSize === "small" && square,
|
|
@@ -2325,14 +2681,14 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
2325
2681
|
className: "rcx-button--content",
|
|
2326
2682
|
children: [
|
|
2327
2683
|
icon && !loading && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
2684
|
+
className: "rcx-button__icon",
|
|
2328
2685
|
size: "x16",
|
|
2329
|
-
name: icon
|
|
2330
|
-
marginInlineEnd: 4
|
|
2686
|
+
name: icon
|
|
2331
2687
|
}),
|
|
2332
2688
|
loading && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
2689
|
+
className: "rcx-button__icon",
|
|
2333
2690
|
size: "x16",
|
|
2334
|
-
name: "loading"
|
|
2335
|
-
marginInlineEnd: 4
|
|
2691
|
+
name: "loading"
|
|
2336
2692
|
}),
|
|
2337
2693
|
children
|
|
2338
2694
|
]
|
|
@@ -2341,6 +2697,13 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
2341
2697
|
}
|
|
2342
2698
|
//#endregion
|
|
2343
2699
|
//#region src/components/Button/IconButton.tsx
|
|
2700
|
+
var iconSizes = {
|
|
2701
|
+
mini: "x12",
|
|
2702
|
+
tiny: "x16",
|
|
2703
|
+
small: "x20",
|
|
2704
|
+
medium: "x24",
|
|
2705
|
+
large: "x28"
|
|
2706
|
+
};
|
|
2344
2707
|
var getVariantClass = (variant) => {
|
|
2345
2708
|
if (variant) return [`rcx-button--icon-${[variant].filter(Boolean).join("-")}`];
|
|
2346
2709
|
return [""];
|
|
@@ -2348,8 +2711,9 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
2348
2711
|
var getPressedClass = (variant) => {
|
|
2349
2712
|
return [`rcx-button--icon-${[variant].filter(Boolean).join("-")}-pressed`];
|
|
2350
2713
|
};
|
|
2351
|
-
function IconButton({ icon, badge, primary, info, secondary, danger, warning, success, mini, large, tiny, small, medium, pressed, children, ...props }) {
|
|
2352
|
-
const variant = (0, react.useMemo)(() => secondary && danger && "secondary-danger" || secondary && warning && "secondary-warning" || secondary && success && "secondary-success" || secondary && info && "secondary-info" || info && "info" || success && "success" || warning && "warning" || danger && "danger" || primary && "secondary-info" || secondary && "secondary" || "", [
|
|
2714
|
+
function IconButton({ icon, badge, badgePosition = "top-end", variant: variantProp, size: sizeProp, primary, info, secondary, danger, warning, success, mini, large, tiny, small, medium, pressed, is = "button", external, color, children, ...props }) {
|
|
2715
|
+
const variant = (0, react.useMemo)(() => (variantProp === "primary" ? "secondary-info" : variantProp) || secondary && danger && "secondary-danger" || secondary && warning && "secondary-warning" || secondary && success && "secondary-success" || secondary && info && "secondary-info" || info && "info" || success && "success" || warning && "warning" || danger && "danger" || primary && "secondary-info" || secondary && "secondary" || "", [
|
|
2716
|
+
variantProp,
|
|
2353
2717
|
danger,
|
|
2354
2718
|
info,
|
|
2355
2719
|
primary,
|
|
@@ -2363,7 +2727,8 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
2363
2727
|
if (pressed) variantProp[`${getPressedClass(variant)}`] = true;
|
|
2364
2728
|
return variantProp;
|
|
2365
2729
|
}, [variant, pressed]);
|
|
2366
|
-
const size = (0, react.useMemo)(() => mini && "mini" || tiny && "tiny" || small && "small" || medium && "medium" || large && "large" || "large", [
|
|
2730
|
+
const size = (0, react.useMemo)(() => sizeProp || mini && "mini" || tiny && "tiny" || small && "small" || medium && "medium" || large && "large" || "large", [
|
|
2731
|
+
sizeProp,
|
|
2367
2732
|
medium,
|
|
2368
2733
|
mini,
|
|
2369
2734
|
small,
|
|
@@ -2371,10 +2736,13 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
2371
2736
|
large
|
|
2372
2737
|
]);
|
|
2373
2738
|
const getSizeClass = () => ({ [`rcx-button--${size}-square`]: true });
|
|
2374
|
-
const getIconSize = () => large && "x28" || medium && "x24" || small && "x20" || tiny && "x16" || mini && "x12" || "x28";
|
|
2739
|
+
const getIconSize = () => sizeProp && iconSizes[sizeProp] || large && "x28" || medium && "x24" || small && "x20" || tiny && "x16" || mini && "x12" || "x28";
|
|
2375
2740
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Box_default, {
|
|
2376
|
-
is
|
|
2377
|
-
|
|
2741
|
+
is,
|
|
2742
|
+
...is === "a" ? {
|
|
2743
|
+
rel: external ? "noopener noreferrer" : void 0,
|
|
2744
|
+
target: external ? "_blank" : void 0
|
|
2745
|
+
} : { type: "button" },
|
|
2378
2746
|
"rcx-button": true,
|
|
2379
2747
|
"rcx-button--icon": true,
|
|
2380
2748
|
"rcx-button--square": true,
|
|
@@ -2382,6 +2750,7 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
2382
2750
|
...getSizeClass(),
|
|
2383
2751
|
"rcx-button--icon-pressed": pressed,
|
|
2384
2752
|
"rcx-button--with-badge": Boolean(badge),
|
|
2753
|
+
color,
|
|
2385
2754
|
...props,
|
|
2386
2755
|
children: [
|
|
2387
2756
|
(0, react.isValidElement)(icon) ? icon : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
@@ -2389,7 +2758,7 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
2389
2758
|
size: getIconSize()
|
|
2390
2759
|
}),
|
|
2391
2760
|
Boolean(badge) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2392
|
-
className:
|
|
2761
|
+
className: `rcx-button__badge rcx-button__badge--${badgePosition}`,
|
|
2393
2762
|
"aria-hidden": "true",
|
|
2394
2763
|
children: badge
|
|
2395
2764
|
}),
|
|
@@ -2455,7 +2824,7 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
2455
2824
|
closeable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2456
2825
|
className: composeClassNames("rcx-banner__close-button")({ inline }),
|
|
2457
2826
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconButton, {
|
|
2458
|
-
|
|
2827
|
+
size: "small",
|
|
2459
2828
|
onClick: handleCloseButtonClick,
|
|
2460
2829
|
icon: "cross"
|
|
2461
2830
|
})
|
|
@@ -2481,8 +2850,7 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
2481
2850
|
...props,
|
|
2482
2851
|
children: [icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
2483
2852
|
name: icon,
|
|
2484
|
-
size: "x16"
|
|
2485
|
-
marginInlineEnd: 8
|
|
2853
|
+
size: "x16"
|
|
2486
2854
|
}), label && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: label })]
|
|
2487
2855
|
});
|
|
2488
2856
|
//#endregion
|
|
@@ -2525,6 +2893,7 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
2525
2893
|
className: [
|
|
2526
2894
|
"rcx-button-group",
|
|
2527
2895
|
stretch && "rcx-button-group--stretch",
|
|
2896
|
+
stretch === "equal" && "rcx-button-group--stretch-equal",
|
|
2528
2897
|
vertical && "rcx-button-group--vertical",
|
|
2529
2898
|
align && `rcx-button-group--align-${align}`,
|
|
2530
2899
|
small && "rcx-button-group--small",
|
|
@@ -2623,7 +2992,7 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
2623
2992
|
//#region src/components/Label/LabelInfo.tsx
|
|
2624
2993
|
var LabelInfo = ({ title, id, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Box_default, {
|
|
2625
2994
|
is: "span",
|
|
2626
|
-
marginInline:
|
|
2995
|
+
marginInline: "x4",
|
|
2627
2996
|
"rcx-label__info": true,
|
|
2628
2997
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2629
2998
|
hidden: true,
|
|
@@ -2684,17 +3053,40 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
2684
3053
|
});
|
|
2685
3054
|
Grid.Item = GridItem;
|
|
2686
3055
|
//#endregion
|
|
3056
|
+
//#region src/components/CardGrid/CardGridItem.tsx
|
|
3057
|
+
/**
|
|
3058
|
+
* A `CardGrid` cell with its own column spans, for grids whose cards are not all the same width.
|
|
3059
|
+
*/
|
|
3060
|
+
var CardGridItem = ({ children, xs, sm, md, lg, xl }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GridItem, {
|
|
3061
|
+
className: "rcx-card-grid__item",
|
|
3062
|
+
xs,
|
|
3063
|
+
sm,
|
|
3064
|
+
md,
|
|
3065
|
+
lg,
|
|
3066
|
+
xl,
|
|
3067
|
+
children
|
|
3068
|
+
});
|
|
3069
|
+
//#endregion
|
|
2687
3070
|
//#region src/components/CardGrid/CardGrid.tsx
|
|
2688
|
-
var CardGrid = ({ children, breakpoints,
|
|
2689
|
-
"rcx-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
3071
|
+
var CardGrid = ({ children, breakpoints, minRowHeight }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
3072
|
+
"rcx-grid__wrapper": true,
|
|
3073
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
3074
|
+
"rcx-grid": true,
|
|
3075
|
+
className: ["rcx-card-grid", minRowHeight !== void 0 && _rocket_chat_css_in_js.css`
|
|
3076
|
+
& > .rcx-card-grid__item {
|
|
3077
|
+
min-height: ${minRowHeight}px;
|
|
3078
|
+
}
|
|
3079
|
+
`],
|
|
3080
|
+
children: react.Children.map(children, (child) => {
|
|
3081
|
+
if (child === null) return null;
|
|
3082
|
+
if ((0, react.isValidElement)(child) && child.type === CardGridItem) return child;
|
|
3083
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GridItem, {
|
|
3084
|
+
className: "rcx-card-grid__item",
|
|
3085
|
+
...breakpoints,
|
|
3086
|
+
children: child
|
|
3087
|
+
});
|
|
3088
|
+
})
|
|
3089
|
+
})
|
|
2698
3090
|
});
|
|
2699
3091
|
//#endregion
|
|
2700
3092
|
//#region src/components/CardGroup/CardGroup.tsx
|
|
@@ -2737,8 +3129,8 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
2737
3129
|
"rcx-code-snippet__codebox": true,
|
|
2738
3130
|
children
|
|
2739
3131
|
}), onClick && children && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
2740
|
-
|
|
2741
|
-
|
|
3132
|
+
size: "small",
|
|
3133
|
+
variant: "primary",
|
|
2742
3134
|
onClick,
|
|
2743
3135
|
disabled: buttonDisabled,
|
|
2744
3136
|
children: buttonText
|
|
@@ -2750,15 +3142,15 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
2750
3142
|
/**
|
|
2751
3143
|
* The `Contextualbar` has the purpose to persist and input information about the scope of the related page.
|
|
2752
3144
|
*/
|
|
2753
|
-
function Contextualbar({
|
|
3145
|
+
function Contextualbar({ stretch, position, ...props }) {
|
|
2754
3146
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
2755
3147
|
"rcx-vertical-bar": true,
|
|
2756
|
-
backgroundColor,
|
|
3148
|
+
backgroundColor: "room",
|
|
2757
3149
|
color: "default",
|
|
2758
3150
|
display: "flex",
|
|
2759
3151
|
flexDirection: "column",
|
|
2760
3152
|
flexShrink: 0,
|
|
2761
|
-
width,
|
|
3153
|
+
width: stretch ? "100%" : void 0,
|
|
2762
3154
|
borderInlineStartWidth: "default",
|
|
2763
3155
|
borderInlineStartColor: "extra-light",
|
|
2764
3156
|
borderInlineStartStyle: "solid",
|
|
@@ -2775,8 +3167,7 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
2775
3167
|
//#region src/components/Contextualbar/ContextualbarAction.tsx
|
|
2776
3168
|
var ContextualbarAction = ({ name, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconButton, {
|
|
2777
3169
|
...props,
|
|
2778
|
-
|
|
2779
|
-
flexShrink: 0,
|
|
3170
|
+
size: "small",
|
|
2780
3171
|
icon: name
|
|
2781
3172
|
});
|
|
2782
3173
|
var ContextualbarAction_default = (0, react.memo)(ContextualbarAction);
|
|
@@ -2790,10 +3181,11 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
2790
3181
|
var ContextualbarButton_default = (0, react.memo)(ContextualbarButton);
|
|
2791
3182
|
//#endregion
|
|
2792
3183
|
//#region src/components/Contextualbar/ContextualbarContent.tsx
|
|
2793
|
-
function ContextualbarContent(props) {
|
|
3184
|
+
function ContextualbarContent({ flush, spaced, ...props }) {
|
|
2794
3185
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
2795
3186
|
"rcx-vertical-bar__content": true,
|
|
2796
|
-
paddingInline: 24,
|
|
3187
|
+
paddingInline: flush ? 0 : 24,
|
|
3188
|
+
paddingBlock: spaced ? 12 : void 0,
|
|
2797
3189
|
display: "flex",
|
|
2798
3190
|
flexDirection: "column",
|
|
2799
3191
|
overflowY: "hidden",
|
|
@@ -2811,17 +3203,20 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
2811
3203
|
});
|
|
2812
3204
|
//#endregion
|
|
2813
3205
|
//#region src/components/States/StatesIcon.tsx
|
|
2814
|
-
var StatesIcon = ({ variation, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
3206
|
+
var StatesIcon = ({ variation, className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
2815
3207
|
...props,
|
|
2816
|
-
|
|
2817
|
-
|
|
3208
|
+
className: [
|
|
3209
|
+
"rcx-states__icon",
|
|
3210
|
+
variation && `rcx-states__icon--${variation}`,
|
|
3211
|
+
className
|
|
3212
|
+
].filter(Boolean).join(" "),
|
|
2818
3213
|
size: "x32"
|
|
2819
3214
|
});
|
|
2820
3215
|
//#endregion
|
|
2821
3216
|
//#region src/components/States/StatesAction.tsx
|
|
2822
|
-
var StatesAction = ({ primary = true, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
3217
|
+
var StatesAction = ({ primary = true, variant = primary ? "primary" : void 0, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
2823
3218
|
...props,
|
|
2824
|
-
|
|
3219
|
+
variant
|
|
2825
3220
|
});
|
|
2826
3221
|
//#endregion
|
|
2827
3222
|
//#region src/components/States/StatesActions.tsx
|
|
@@ -2882,13 +3277,18 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
2882
3277
|
//#region src/components/Contextualbar/ContextualbarEmptyContent.tsx
|
|
2883
3278
|
function ContextualbarEmptyContent({ icon = "magnifier", title = "Nothing Found", subtitle, ...props }) {
|
|
2884
3279
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ContextualbarContent_default, {
|
|
2885
|
-
justifyContent: "center",
|
|
2886
3280
|
...props,
|
|
2887
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
3281
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
3282
|
+
display: "flex",
|
|
3283
|
+
flexDirection: "column",
|
|
3284
|
+
justifyContent: "center",
|
|
3285
|
+
flexGrow: 1,
|
|
3286
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(States, { children: [
|
|
3287
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(StatesIcon, { name: icon }),
|
|
3288
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(StatesTitle, { children: title }),
|
|
3289
|
+
subtitle && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StatesSubtitle, { children: subtitle })
|
|
3290
|
+
] })
|
|
3291
|
+
})
|
|
2892
3292
|
});
|
|
2893
3293
|
}
|
|
2894
3294
|
var ContextualbarEmptyContent_default = (0, react.memo)(ContextualbarEmptyContent);
|
|
@@ -2923,8 +3323,8 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
2923
3323
|
marginInline: -4,
|
|
2924
3324
|
paddingInline: 4,
|
|
2925
3325
|
className: _rocket_chat_css_in_js.css`
|
|
2926
|
-
|
|
2927
|
-
|
|
3326
|
+
gap: 8px;
|
|
3327
|
+
`,
|
|
2928
3328
|
children
|
|
2929
3329
|
})
|
|
2930
3330
|
});
|
|
@@ -2933,7 +3333,6 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
2933
3333
|
//#region src/components/Contextualbar/ContextualbarIcon.tsx
|
|
2934
3334
|
var ContextualbarIcon = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
2935
3335
|
...props,
|
|
2936
|
-
paddingInline: 2,
|
|
2937
3336
|
size: "x20"
|
|
2938
3337
|
});
|
|
2939
3338
|
var ContextualbarIcon_default = (0, react.memo)(ContextualbarIcon);
|
|
@@ -2958,12 +3357,14 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
2958
3357
|
...props,
|
|
2959
3358
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ContextualbarHeader_default, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Skeleton, { width: "100%" }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Box_default, {
|
|
2960
3359
|
padding: 24,
|
|
3360
|
+
display: "flex",
|
|
3361
|
+
flexDirection: "column",
|
|
3362
|
+
gap: 4,
|
|
2961
3363
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Skeleton, {
|
|
2962
|
-
marginBlockEnd: 4,
|
|
2963
3364
|
width: "32px",
|
|
2964
3365
|
height: "32px",
|
|
2965
3366
|
variant: "rect"
|
|
2966
|
-
}), Array(5).fill(5).map((_, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Skeleton, {}, index))]
|
|
3367
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, { children: Array(5).fill(5).map((_, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Skeleton, {}, index)) })]
|
|
2967
3368
|
})]
|
|
2968
3369
|
});
|
|
2969
3370
|
var ContextualbarSkeleton_default = (0, react.memo)(ContextualbarSkeleton);
|
|
@@ -2981,21 +3382,11 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
2981
3382
|
//#endregion
|
|
2982
3383
|
//#region src/components/Dropdown/DropdownDesktop.tsx
|
|
2983
3384
|
function DropdownDesktop({ children, style, ...props }) {
|
|
2984
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3385
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PopoverSurface, {
|
|
2985
3386
|
style,
|
|
2986
|
-
elevation: "2",
|
|
2987
|
-
paddingInline: "0",
|
|
2988
|
-
paddingBlock: "0",
|
|
2989
|
-
display: "flex",
|
|
2990
|
-
flexDirection: "column",
|
|
2991
|
-
overflow: "auto",
|
|
2992
3387
|
"data-testid": "dropdown",
|
|
2993
3388
|
...props,
|
|
2994
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
2995
|
-
flexShrink: 1,
|
|
2996
|
-
paddingBlock: 12,
|
|
2997
|
-
children: style?.visibility === "hidden" ? null : children
|
|
2998
|
-
})
|
|
3389
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, { children: style?.visibility === "hidden" ? null : children })
|
|
2999
3390
|
});
|
|
3000
3391
|
}
|
|
3001
3392
|
//#endregion
|
|
@@ -3010,26 +3401,21 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
3010
3401
|
}
|
|
3011
3402
|
//#endregion
|
|
3012
3403
|
//#region src/components/Dropdown/DropdownMobile.tsx
|
|
3404
|
+
var bottomSheet = {
|
|
3405
|
+
position: "fixed",
|
|
3406
|
+
bottom: 0,
|
|
3407
|
+
left: 0,
|
|
3408
|
+
zIndex: 2,
|
|
3409
|
+
width: "100vw"
|
|
3410
|
+
};
|
|
3013
3411
|
function DropdownMobile({ children, ...props }) {
|
|
3014
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
width: "100vw",
|
|
3019
|
-
maxHeight: "80%",
|
|
3020
|
-
position: "fixed",
|
|
3021
|
-
display: "flex",
|
|
3022
|
-
flexDirection: "column",
|
|
3023
|
-
overflow: "auto",
|
|
3024
|
-
style: {
|
|
3025
|
-
bottom: 0,
|
|
3026
|
-
left: 0
|
|
3027
|
-
},
|
|
3028
|
-
zIndex: 2,
|
|
3412
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PopoverSurface, {
|
|
3413
|
+
flush: true,
|
|
3414
|
+
maxHeight: "most-of-screen",
|
|
3415
|
+
style: bottomSheet,
|
|
3029
3416
|
"data-testid": "dropdown",
|
|
3030
3417
|
...props,
|
|
3031
3418
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
3032
|
-
flexShrink: 1,
|
|
3033
3419
|
paddingBlock: 16,
|
|
3034
3420
|
children
|
|
3035
3421
|
})
|
|
@@ -3130,10 +3516,10 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
3130
3516
|
};
|
|
3131
3517
|
//#endregion
|
|
3132
3518
|
//#region src/components/Field/FieldLabel.tsx
|
|
3133
|
-
function FieldLabel(props) {
|
|
3519
|
+
function FieldLabel({ className, ...props }) {
|
|
3134
3520
|
const component = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Label, {
|
|
3135
|
-
|
|
3136
|
-
|
|
3521
|
+
...props,
|
|
3522
|
+
className: prependClassName(className, "rcx-field__label")
|
|
3137
3523
|
});
|
|
3138
3524
|
if (process.env.NODE_ENV === "development") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WithErrorWrapper, {
|
|
3139
3525
|
context: FieldContext,
|
|
@@ -3173,10 +3559,11 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
3173
3559
|
};
|
|
3174
3560
|
//#endregion
|
|
3175
3561
|
//#region src/components/Field/FieldRow.tsx
|
|
3176
|
-
var FieldRow = (props) => {
|
|
3562
|
+
var FieldRow = ({ justify, ...props }) => {
|
|
3177
3563
|
const component = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
3178
3564
|
is: "span",
|
|
3179
3565
|
"rcx-field__row": true,
|
|
3566
|
+
"rcx-field__row--justify-end": justify === "end",
|
|
3180
3567
|
...props
|
|
3181
3568
|
});
|
|
3182
3569
|
if (process.env.NODE_ENV === "development") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WithErrorWrapper, {
|
|
@@ -3247,61 +3634,82 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
3247
3634
|
}
|
|
3248
3635
|
//#endregion
|
|
3249
3636
|
//#region src/components/FramedIcon/FramedIcon.tsx
|
|
3250
|
-
var FramedIcon = ({ info, success, warning, danger, neutral, icon, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
3637
|
+
var FramedIcon = ({ info, success, warning, danger, neutral, icon, className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
3251
3638
|
...props,
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3639
|
+
className: [
|
|
3640
|
+
className,
|
|
3641
|
+
"rcx-framed-icon",
|
|
3642
|
+
info && "rcx-framed-icon--info",
|
|
3643
|
+
success && "rcx-framed-icon--success",
|
|
3644
|
+
warning && "rcx-framed-icon--warning",
|
|
3645
|
+
danger && "rcx-framed-icon--danger",
|
|
3646
|
+
(neutral || !info && !success && !warning && !danger) && "rcx-framed-icon--neutral"
|
|
3647
|
+
].filter(Boolean).join(" "),
|
|
3258
3648
|
name: icon,
|
|
3259
3649
|
size: 20
|
|
3260
3650
|
});
|
|
3261
3651
|
//#endregion
|
|
3262
|
-
//#region src/components/
|
|
3263
|
-
|
|
3264
|
-
|
|
3652
|
+
//#region src/components/Listbox/Listbox.tsx
|
|
3653
|
+
/**
|
|
3654
|
+
* A popup list of `ListboxOption`s that a combobox controls: focus stays on the combobox, which marks the active option with `aria-activedescendant`.
|
|
3655
|
+
*/
|
|
3656
|
+
function Listbox({ children, ...props }) {
|
|
3657
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
3658
|
+
is: "ul",
|
|
3659
|
+
role: "listbox",
|
|
3660
|
+
margin: 0,
|
|
3661
|
+
padding: 0,
|
|
3265
3662
|
...props,
|
|
3266
|
-
|
|
3663
|
+
children
|
|
3664
|
+
});
|
|
3665
|
+
}
|
|
3666
|
+
//#endregion
|
|
3667
|
+
//#region src/components/Listbox/ListboxOption.tsx
|
|
3668
|
+
var keepFocusOnCombobox = (event) => event.preventDefault();
|
|
3669
|
+
/**
|
|
3670
|
+
* An option of a `Listbox`. It never takes focus, so pressing it leaves the focus on the combobox.
|
|
3671
|
+
*/
|
|
3672
|
+
function ListboxOption({ id, children, selected, active, focusVisible, disabled, onActivate, onSelect }) {
|
|
3673
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Option_default, {
|
|
3267
3674
|
id,
|
|
3268
|
-
"
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3675
|
+
role: "option",
|
|
3676
|
+
label: children,
|
|
3677
|
+
selected,
|
|
3678
|
+
focus: active,
|
|
3679
|
+
focusVisible: !!focusVisible && !!active,
|
|
3680
|
+
disabled,
|
|
3681
|
+
onPointerDown: keepFocusOnCombobox,
|
|
3682
|
+
onPointerMove: () => {
|
|
3683
|
+
if (!disabled && (!active || focusVisible)) onActivate?.();
|
|
3277
3684
|
},
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
className,
|
|
3281
|
-
focus && "rcx-option--focus",
|
|
3282
|
-
selected && "rcx-option--selected",
|
|
3283
|
-
disabled && "rcx-option--disabled",
|
|
3284
|
-
variant && `rcx-option--${variant}`
|
|
3285
|
-
].filter(Boolean).join(" ")
|
|
3286
|
-
}, children);
|
|
3685
|
+
onClick: () => onSelect?.()
|
|
3686
|
+
});
|
|
3287
3687
|
}
|
|
3288
|
-
var
|
|
3688
|
+
var ListboxOption_default = (0, react.memo)(ListboxOption);
|
|
3289
3689
|
//#endregion
|
|
3290
3690
|
//#region src/components/Menu/MenuItem.tsx
|
|
3691
|
+
/**
|
|
3692
|
+
* Renders a menu item as an `Item` row, so its content is composed from `Item` parts.
|
|
3693
|
+
*/
|
|
3291
3694
|
function MenuItem$1({ item, state }) {
|
|
3292
3695
|
const ref = (0, react.useRef)(null);
|
|
3696
|
+
const { isFocusVisible } = (0, react_aria.useFocusVisible)();
|
|
3293
3697
|
const { menuItemProps: { onPointerUp, ...menuItemProps }, isFocused, isDisabled } = (0, react_aria.useMenuItem)({ key: item.key }, state, ref);
|
|
3294
|
-
|
|
3698
|
+
const description = item.value?.description;
|
|
3699
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Item, {
|
|
3295
3700
|
...(0, react_aria.mergeProps)(menuItemProps, { onPointerDown: onPointerUp }),
|
|
3296
3701
|
ref,
|
|
3297
|
-
focus: isFocused,
|
|
3298
|
-
disabled: isDisabled,
|
|
3299
3702
|
is: "label",
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3703
|
+
inset: "md",
|
|
3704
|
+
focused: isFocused,
|
|
3705
|
+
focusVisible: isFocused && isFocusVisible,
|
|
3706
|
+
disabled: isDisabled,
|
|
3707
|
+
variant: item.value?.variant === "danger" ? "danger" : void 0,
|
|
3708
|
+
className: description ? "rcx-menu-item--with-description" : void 0,
|
|
3709
|
+
children: [typeof item.rendered === "string" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemContent, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemTitle, { children: item.rendered }) }) : item.rendered, description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3710
|
+
className: "rcx-menu-item__description",
|
|
3711
|
+
children: description
|
|
3712
|
+
})]
|
|
3305
3713
|
});
|
|
3306
3714
|
}
|
|
3307
3715
|
//#endregion
|
|
@@ -3369,11 +3777,12 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
3369
3777
|
popoverRef,
|
|
3370
3778
|
...props,
|
|
3371
3779
|
portalContainer: isSubmenu ? groupContainer?.current ?? void 0 : void 0,
|
|
3372
|
-
children: [isMobile ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DropdownMobile, { children }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3373
|
-
maxHeight: "80vh",
|
|
3374
|
-
overflowY: "auto",
|
|
3780
|
+
children: [isMobile ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DropdownMobile, { children }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
3375
3781
|
maxWidth,
|
|
3376
|
-
children
|
|
3782
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DropdownDesktop, {
|
|
3783
|
+
maxHeight: "most-of-screen",
|
|
3784
|
+
children
|
|
3785
|
+
})
|
|
3377
3786
|
}), !isSubmenu && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3378
3787
|
ref: containerRef,
|
|
3379
3788
|
style: { display: "contents" }
|
|
@@ -3431,12 +3840,13 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
3431
3840
|
}
|
|
3432
3841
|
submenuTriggerProps.onKeyDown?.(event);
|
|
3433
3842
|
};
|
|
3843
|
+
const { isFocusVisible } = (0, react_aria.useFocusVisible)();
|
|
3434
3844
|
const { menuItemProps, isFocused, isDisabled } = (0, react_aria.useMenuItem)({
|
|
3435
3845
|
...submenuTriggerProps,
|
|
3436
3846
|
onKeyDown: onTriggerKeyDown,
|
|
3437
3847
|
key: item.key
|
|
3438
3848
|
}, state, triggerRef);
|
|
3439
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.
|
|
3849
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Item, {
|
|
3440
3850
|
...(0, react_aria.mergeProps)(menuItemProps, {
|
|
3441
3851
|
"id": submenuTriggerProps.id,
|
|
3442
3852
|
"aria-haspopup": submenuTriggerProps["aria-haspopup"],
|
|
@@ -3444,20 +3854,16 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
3444
3854
|
"aria-controls": submenuTriggerProps["aria-controls"]
|
|
3445
3855
|
}),
|
|
3446
3856
|
ref: triggerRef,
|
|
3447
|
-
focus: isFocused,
|
|
3448
|
-
disabled: isDisabled,
|
|
3449
3857
|
is: "div",
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
})]
|
|
3460
|
-
})
|
|
3858
|
+
inset: "md",
|
|
3859
|
+
focused: isFocused,
|
|
3860
|
+
focusVisible: isFocused && isFocusVisible,
|
|
3861
|
+
disabled: isDisabled,
|
|
3862
|
+
variant: item.value?.variant === "danger" ? "danger" : void 0,
|
|
3863
|
+
children: [item.rendered, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemIcon, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
3864
|
+
name: "chevron-left",
|
|
3865
|
+
size: "x16"
|
|
3866
|
+
}) })]
|
|
3461
3867
|
}), submenuTriggerState.isOpen && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MenuPopover, {
|
|
3462
3868
|
...popoverProps,
|
|
3463
3869
|
state: submenuTriggerState,
|
|
@@ -3480,15 +3886,17 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
3480
3886
|
"heading": section.rendered,
|
|
3481
3887
|
"aria-label": section["aria-label"]
|
|
3482
3888
|
});
|
|
3483
|
-
const { separatorProps } = (0, react_aria.useSeparator)({ elementType: "
|
|
3484
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [section.key !== state.collection.getFirstKey() && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3889
|
+
const { separatorProps } = (0, react_aria.useSeparator)({ elementType: "div" });
|
|
3890
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [section.key !== state.collection.getFirstKey() && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemDivider, { ...separatorProps }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3485
3891
|
...itemProps,
|
|
3486
|
-
children: [section.rendered && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3487
|
-
|
|
3488
|
-
children:
|
|
3489
|
-
|
|
3892
|
+
children: [section.rendered && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemGroupHeader, {
|
|
3893
|
+
inset: "md",
|
|
3894
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemGroupTitle, {
|
|
3895
|
+
...headingProps,
|
|
3896
|
+
children: section.rendered
|
|
3897
|
+
})
|
|
3898
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3490
3899
|
...groupProps,
|
|
3491
|
-
padding: "0",
|
|
3492
3900
|
children: [...section.childNodes].map((node) => node.hasChildNodes ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MenuSubmenu, {
|
|
3493
3901
|
item: node,
|
|
3494
3902
|
state,
|
|
@@ -3564,14 +3972,8 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
3564
3972
|
"aria-label": props["aria-label"] || title,
|
|
3565
3973
|
preventFocusOnPress: true
|
|
3566
3974
|
}, ref);
|
|
3567
|
-
const { large, medium, tiny, mini } = props;
|
|
3568
|
-
const
|
|
3569
|
-
large,
|
|
3570
|
-
medium,
|
|
3571
|
-
tiny,
|
|
3572
|
-
mini
|
|
3573
|
-
};
|
|
3574
|
-
const defaultSmall = !large && !medium && !tiny && !mini;
|
|
3975
|
+
const { size, large, medium, tiny, mini } = props;
|
|
3976
|
+
const triggerSize = size || mini && "mini" || tiny && "tiny" || medium && "medium" || large && "large" || "small";
|
|
3575
3977
|
const { document: ownerDocument } = useOwnerDocument();
|
|
3576
3978
|
const popover = state.isOpen && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MenuPopover, {
|
|
3577
3979
|
state,
|
|
@@ -3598,8 +4000,7 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
3598
4000
|
className,
|
|
3599
4001
|
title,
|
|
3600
4002
|
pressed: pressed || state.isOpen,
|
|
3601
|
-
|
|
3602
|
-
...sizes
|
|
4003
|
+
size: triggerSize
|
|
3603
4004
|
}), detached ? (0, react_dom.createPortal)(popover, ownerDocument?.body || document.body) : popover] });
|
|
3604
4005
|
};
|
|
3605
4006
|
//#endregion
|
|
@@ -3787,7 +4188,7 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
3787
4188
|
//#region src/components/Message/MessageEmojiBase.tsx
|
|
3788
4189
|
var MessageEmojiBase = ({ name, image, className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3789
4190
|
className: `${className || ""} ${name}`,
|
|
3790
|
-
style: image
|
|
4191
|
+
style: image?.length ? { backgroundImage: image } : void 0,
|
|
3791
4192
|
...props
|
|
3792
4193
|
});
|
|
3793
4194
|
//#endregion
|
|
@@ -3872,11 +4273,10 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
3872
4273
|
};
|
|
3873
4274
|
//#endregion
|
|
3874
4275
|
//#region src/components/Message/MessageGenericPreview/MessageGenericPreviewIcon.tsx
|
|
3875
|
-
var MessageGenericPreviewIcon = ({ name = "attachment-file", size = 32,
|
|
4276
|
+
var MessageGenericPreviewIcon = ({ name = "attachment-file", size = 32, type = "file" }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3876
4277
|
className: "rcx-message-generic-preview__icon",
|
|
3877
4278
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
3878
4279
|
name,
|
|
3879
|
-
color,
|
|
3880
4280
|
size
|
|
3881
4281
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3882
4282
|
className: "rcx-message-generic-preview__icon-title",
|
|
@@ -3952,11 +4352,10 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
3952
4352
|
});
|
|
3953
4353
|
//#endregion
|
|
3954
4354
|
//#region src/components/Message/MessageMetrics/MessageMetricsFollowing.tsx
|
|
3955
|
-
var MessageMetricsFollowing = ({ name, badge, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconButton, {
|
|
3956
|
-
position: "relative",
|
|
3957
|
-
overflow: "visible",
|
|
4355
|
+
var MessageMetricsFollowing = ({ name, badge, className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconButton, {
|
|
3958
4356
|
...props,
|
|
3959
|
-
|
|
4357
|
+
className: ["rcx-message-metrics__item__follow", className].filter(Boolean).join(" "),
|
|
4358
|
+
size: "small",
|
|
3960
4359
|
icon: name,
|
|
3961
4360
|
children: badge && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3962
4361
|
className: "rcx-message-metrics__item__follow-badge",
|
|
@@ -3966,9 +4365,9 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
3966
4365
|
//#endregion
|
|
3967
4366
|
//#region src/components/Message/MessageMetrics/MessageMetricsReply.tsx
|
|
3968
4367
|
var MessageMetricsReply = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MessageMetricsItem, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
4368
|
+
variant: "primary",
|
|
4369
|
+
size: "small",
|
|
4370
|
+
...props
|
|
3972
4371
|
}) });
|
|
3973
4372
|
//#endregion
|
|
3974
4373
|
//#region src/components/Message/MessageName.tsx
|
|
@@ -4039,11 +4438,12 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
4039
4438
|
/**
|
|
4040
4439
|
* Used for mentions
|
|
4041
4440
|
*/
|
|
4042
|
-
var Tag = ({ large, medium, className, disabled, onClick, variant, children, icon, href, ...props }) => {
|
|
4441
|
+
var Tag = ({ large, medium, pill, className, disabled, onClick, variant, children, icon, href, ...props }) => {
|
|
4043
4442
|
const modifiers = [
|
|
4044
4443
|
variant,
|
|
4045
4444
|
medium && "medium",
|
|
4046
4445
|
large && "large",
|
|
4446
|
+
pill && "pill",
|
|
4047
4447
|
disabled && "disabled",
|
|
4048
4448
|
onClick && "clickable",
|
|
4049
4449
|
href && "clickable"
|
|
@@ -4161,7 +4561,7 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
4161
4561
|
//#region src/components/Message/MessageToolbar/MessageToolbarItem.tsx
|
|
4162
4562
|
function MessageToolbarItem(props) {
|
|
4163
4563
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconButton, {
|
|
4164
|
-
|
|
4564
|
+
size: "small",
|
|
4165
4565
|
...props
|
|
4166
4566
|
});
|
|
4167
4567
|
}
|
|
@@ -4266,8 +4666,9 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
4266
4666
|
};
|
|
4267
4667
|
//#endregion
|
|
4268
4668
|
//#region src/components/Modal/ModalBackdrop.tsx
|
|
4269
|
-
var ModalBackdrop = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
4669
|
+
var ModalBackdrop = ({ transparent, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
4270
4670
|
"rcx-modal__backdrop": true,
|
|
4671
|
+
backgroundColor: transparent ? "transparent" : void 0,
|
|
4271
4672
|
...props
|
|
4272
4673
|
});
|
|
4273
4674
|
//#endregion
|
|
@@ -4275,12 +4676,12 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
4275
4676
|
var ModalClose = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconButton, {
|
|
4276
4677
|
"aria-label": "Close",
|
|
4277
4678
|
...props,
|
|
4278
|
-
|
|
4679
|
+
size: "small",
|
|
4279
4680
|
icon: "cross"
|
|
4280
4681
|
});
|
|
4281
4682
|
//#endregion
|
|
4282
4683
|
//#region src/components/Modal/ModalContent.tsx
|
|
4283
|
-
var ModalContent = ({ children, onScrollContent, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Scrollable, {
|
|
4684
|
+
var ModalContent = ({ children, onScrollContent, fill, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Scrollable, {
|
|
4284
4685
|
vertical: true,
|
|
4285
4686
|
onScrollContent,
|
|
4286
4687
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
@@ -4288,6 +4689,8 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
4288
4689
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
4289
4690
|
"rcx-modal__content-wrapper": true,
|
|
4290
4691
|
marginInline: 24,
|
|
4692
|
+
height: fill ? "100%" : void 0,
|
|
4693
|
+
paddingBlockEnd: fill ? 16 : void 0,
|
|
4291
4694
|
...props,
|
|
4292
4695
|
children
|
|
4293
4696
|
})
|
|
@@ -4295,8 +4698,8 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
4295
4698
|
});
|
|
4296
4699
|
//#endregion
|
|
4297
4700
|
//#region src/components/Modal/ModalFooter.tsx
|
|
4298
|
-
var ModalFooter = ({ children,
|
|
4299
|
-
justifyContent,
|
|
4701
|
+
var ModalFooter = ({ children, justify = "end" }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
4702
|
+
justifyContent: justify,
|
|
4300
4703
|
"rcx-modal__footer": true,
|
|
4301
4704
|
children
|
|
4302
4705
|
});
|
|
@@ -4345,20 +4748,28 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
4345
4748
|
});
|
|
4346
4749
|
//#endregion
|
|
4347
4750
|
//#region src/components/Modal/ModalIcon.tsx
|
|
4348
|
-
var
|
|
4751
|
+
var variantColors = {
|
|
4752
|
+
danger: "danger",
|
|
4753
|
+
warning: "status-font-on-warning",
|
|
4754
|
+
info: "info",
|
|
4755
|
+
success: "status-font-on-success"
|
|
4756
|
+
};
|
|
4757
|
+
var ModalIcon = ({ size = "x20", name, variant, align = "center", ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
4758
|
+
paddingBlock: 4,
|
|
4759
|
+
color: variant && variantColors[variant],
|
|
4349
4760
|
...props,
|
|
4350
4761
|
display: "flex",
|
|
4351
|
-
alignItems,
|
|
4762
|
+
alignItems: align,
|
|
4352
4763
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
4353
|
-
marginBlock: 4,
|
|
4354
4764
|
name,
|
|
4355
4765
|
size
|
|
4356
4766
|
})
|
|
4357
4767
|
});
|
|
4358
4768
|
//#endregion
|
|
4359
4769
|
//#region src/components/Modal/ModalTagline.tsx
|
|
4360
|
-
var ModalTagline = ({ children, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
4770
|
+
var ModalTagline = ({ subtle, children, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
4361
4771
|
"rcx-modal__tagline": true,
|
|
4772
|
+
color: subtle ? "annotation" : void 0,
|
|
4362
4773
|
...props,
|
|
4363
4774
|
children
|
|
4364
4775
|
});
|
|
@@ -4377,30 +4788,14 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
4377
4788
|
children
|
|
4378
4789
|
});
|
|
4379
4790
|
//#endregion
|
|
4380
|
-
//#region src/components/
|
|
4381
|
-
function
|
|
4382
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
4383
|
-
is: "div",
|
|
4384
|
-
"rcx-select__addon": true,
|
|
4385
|
-
...props
|
|
4386
|
-
});
|
|
4387
|
-
}
|
|
4388
|
-
//#endregion
|
|
4389
|
-
//#region src/components/Select/SelectFocus.tsx
|
|
4390
|
-
function SelectFocus(props) {
|
|
4791
|
+
//#region src/components/MultiSelect/MultiSelectAnchor.tsx
|
|
4792
|
+
function MultiSelectAnchor(props) {
|
|
4391
4793
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
4392
4794
|
fontScale: "p2m",
|
|
4393
4795
|
color: "hint",
|
|
4394
4796
|
"rcx-select__focus": true,
|
|
4395
4797
|
is: "button",
|
|
4396
4798
|
type: "button",
|
|
4397
|
-
...props
|
|
4398
|
-
});
|
|
4399
|
-
}
|
|
4400
|
-
//#endregion
|
|
4401
|
-
//#region src/components/MultiSelect/MultiSelectAnchor.tsx
|
|
4402
|
-
function MultiSelectAnchor(props) {
|
|
4403
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectFocus, {
|
|
4404
4799
|
"rcx-input-box--undecorated": true,
|
|
4405
4800
|
order: 1,
|
|
4406
4801
|
...props
|
|
@@ -4412,6 +4807,15 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
4412
4807
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Chip_default, { ...props });
|
|
4413
4808
|
});
|
|
4414
4809
|
//#endregion
|
|
4810
|
+
//#region src/components/Select/SelectAddon.tsx
|
|
4811
|
+
function SelectAddon(props) {
|
|
4812
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
4813
|
+
is: "div",
|
|
4814
|
+
"rcx-select__addon": true,
|
|
4815
|
+
...props
|
|
4816
|
+
});
|
|
4817
|
+
}
|
|
4818
|
+
//#endregion
|
|
4415
4819
|
//#region src/components/MultiSelect/MultiSelect.tsx
|
|
4416
4820
|
/**
|
|
4417
4821
|
* An input for selection of options.
|
|
@@ -4474,55 +4878,53 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
4474
4878
|
inline: "x4",
|
|
4475
4879
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FlexContainer, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
4476
4880
|
is: "div",
|
|
4477
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.
|
|
4881
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Box_default, {
|
|
4478
4882
|
is: "div",
|
|
4479
4883
|
display: "flex",
|
|
4480
4884
|
alignItems: "center",
|
|
4481
4885
|
flexWrap: "wrap",
|
|
4482
|
-
margin: "-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
})]
|
|
4525
|
-
})
|
|
4886
|
+
margin: "-x4",
|
|
4887
|
+
gap: 4,
|
|
4888
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Anchor, {
|
|
4889
|
+
ref: anchorRef,
|
|
4890
|
+
disabled: disabled ?? false,
|
|
4891
|
+
onClick: show,
|
|
4892
|
+
onBlur: hide,
|
|
4893
|
+
onKeyDown: handleKeyDown,
|
|
4894
|
+
onKeyUp: handleKeyUp,
|
|
4895
|
+
role: "combobox",
|
|
4896
|
+
"aria-expanded": visible === AnimatedVisibility.VISIBLE,
|
|
4897
|
+
"aria-haspopup": "listbox",
|
|
4898
|
+
"aria-controls": listboxId,
|
|
4899
|
+
id,
|
|
4900
|
+
name,
|
|
4901
|
+
"aria-label": ariaLabel,
|
|
4902
|
+
"aria-labelledby": ariaLabelledBy,
|
|
4903
|
+
"aria-describedby": ariaDescribedBy,
|
|
4904
|
+
"aria-invalid": ariaInvalid,
|
|
4905
|
+
"aria-required": ariaRequired,
|
|
4906
|
+
children: internalValue.length === 0 ? placeholder : null
|
|
4907
|
+
}), internalValue.map((value) => {
|
|
4908
|
+
const currentOption = options.find(([val]) => val === value);
|
|
4909
|
+
return RenderSelected ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RenderSelected, {
|
|
4910
|
+
value,
|
|
4911
|
+
label: getLabel(currentOption),
|
|
4912
|
+
onMouseDown: (e) => {
|
|
4913
|
+
prevent(e);
|
|
4914
|
+
internalChanged(currentOption);
|
|
4915
|
+
removeFocusClass();
|
|
4916
|
+
},
|
|
4917
|
+
children: getLabel(currentOption)
|
|
4918
|
+
}, value) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectedOptions, {
|
|
4919
|
+
tabIndex: -1,
|
|
4920
|
+
onMouseDown: (e) => {
|
|
4921
|
+
prevent(e);
|
|
4922
|
+
internalChanged(currentOption);
|
|
4923
|
+
removeFocusClass();
|
|
4924
|
+
},
|
|
4925
|
+
children: getLabel(currentOption)
|
|
4926
|
+
}, String(value));
|
|
4927
|
+
})]
|
|
4526
4928
|
})
|
|
4527
4929
|
}) })
|
|
4528
4930
|
})
|
|
@@ -4530,13 +4932,10 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
4530
4932
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(FlexItem, {
|
|
4531
4933
|
grow: 0,
|
|
4532
4934
|
shrink: 0,
|
|
4533
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
size: "x20"
|
|
4538
|
-
}) })
|
|
4539
|
-
})
|
|
4935
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectAddon, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
4936
|
+
name: visible === AnimatedVisibility.VISIBLE ? "chevron-up" : addonIcon || "chevron-down",
|
|
4937
|
+
size: "x20"
|
|
4938
|
+
}) })
|
|
4540
4939
|
}),
|
|
4541
4940
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PositionAnimated, {
|
|
4542
4941
|
visible,
|
|
@@ -4566,13 +4965,13 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
4566
4965
|
const { placeholder, filter, setFilter } = (0, react.use)(MultiSelectFilteredContext);
|
|
4567
4966
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FlexItem, {
|
|
4568
4967
|
grow: 1,
|
|
4968
|
+
order: 1,
|
|
4569
4969
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Input, {
|
|
4570
4970
|
placeholder,
|
|
4571
4971
|
value: filter,
|
|
4572
4972
|
onInput: (e) => setFilter?.(e.currentTarget.value),
|
|
4573
4973
|
...props,
|
|
4574
|
-
"rcx-input-box--undecorated"
|
|
4575
|
-
order: 1,
|
|
4974
|
+
className: "rcx-input-box--undecorated",
|
|
4576
4975
|
autoComplete: "off"
|
|
4577
4976
|
})
|
|
4578
4977
|
});
|
|
@@ -4614,10 +5013,10 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
4614
5013
|
//#region src/components/NavBar/NavBarItem.tsx
|
|
4615
5014
|
function NavBarItem({ children, icon, ...props }) {
|
|
4616
5015
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: icon ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconButton, {
|
|
4617
|
-
"rcx-navbar-item": true,
|
|
4618
5016
|
icon,
|
|
4619
|
-
|
|
4620
|
-
...props
|
|
5017
|
+
size: "small",
|
|
5018
|
+
...props,
|
|
5019
|
+
className: ["rcx-navbar-item", props.className].filter(Boolean).join(" ")
|
|
4621
5020
|
}) : patchChildren(children, (childProps) => ({
|
|
4622
5021
|
className: appendClassName(childProps.className, "rcx-navbar-item"),
|
|
4623
5022
|
...props
|
|
@@ -4625,10 +5024,10 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
4625
5024
|
}
|
|
4626
5025
|
//#endregion
|
|
4627
5026
|
//#region src/components/NavBar/NavBarDivider.tsx
|
|
4628
|
-
var NavBarDivider = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Divider, {
|
|
4629
|
-
"rcx-navbar-divider": true,
|
|
5027
|
+
var NavBarDivider = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Divider, {
|
|
4630
5028
|
vertical: true,
|
|
4631
|
-
...props
|
|
5029
|
+
...props,
|
|
5030
|
+
className: ["rcx-navbar-divider", className].filter(Boolean).join(" ")
|
|
4632
5031
|
});
|
|
4633
5032
|
//#endregion
|
|
4634
5033
|
//#region src/components/NavBar/NavBarSection.tsx
|
|
@@ -4654,14 +5053,6 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
4654
5053
|
//#endregion
|
|
4655
5054
|
//#region src/components/OptionsPaginated/OptionsPaginated.tsx
|
|
4656
5055
|
var Empty = (0, react.memo)(() => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Option_default, { label: "Empty" }));
|
|
4657
|
-
(0, react.memo)(function CheckOption({ selected, children: label, ...options }) {
|
|
4658
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Option_default, {
|
|
4659
|
-
label,
|
|
4660
|
-
selected,
|
|
4661
|
-
...options,
|
|
4662
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CheckBox, { checked: selected })
|
|
4663
|
-
});
|
|
4664
|
-
});
|
|
4665
5056
|
/**
|
|
4666
5057
|
* An input for selection of options.
|
|
4667
5058
|
*/
|
|
@@ -4688,36 +5079,33 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
4688
5079
|
"rcx-options": true,
|
|
4689
5080
|
...props,
|
|
4690
5081
|
ref,
|
|
4691
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
totalCount: options.length,
|
|
4700
|
-
data: options,
|
|
4701
|
-
itemContent: (index, data) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OptionsComponentWithData, {
|
|
4702
|
-
index,
|
|
4703
|
-
data
|
|
4704
|
-
})
|
|
5082
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PopoverSurface, { children: !options.length ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmptyComponent, {}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_virtuoso.Virtuoso, {
|
|
5083
|
+
endReached,
|
|
5084
|
+
style: { height: "144px" },
|
|
5085
|
+
totalCount: options.length,
|
|
5086
|
+
data: options,
|
|
5087
|
+
itemContent: (index, data) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OptionsComponentWithData, {
|
|
5088
|
+
index,
|
|
5089
|
+
data
|
|
4705
5090
|
})
|
|
4706
|
-
})
|
|
5091
|
+
}) })
|
|
4707
5092
|
});
|
|
4708
5093
|
}
|
|
4709
5094
|
//#endregion
|
|
4710
|
-
//#region src/components/
|
|
4711
|
-
function
|
|
5095
|
+
//#region src/components/Select/SelectFocus.tsx
|
|
5096
|
+
function SelectFocus(props) {
|
|
4712
5097
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
4713
|
-
|
|
4714
|
-
"
|
|
5098
|
+
fontScale: "p2m",
|
|
5099
|
+
color: "hint",
|
|
5100
|
+
"rcx-select__focus": true,
|
|
5101
|
+
is: "button",
|
|
5102
|
+
type: "button",
|
|
4715
5103
|
...props
|
|
4716
5104
|
});
|
|
4717
5105
|
}
|
|
4718
5106
|
//#endregion
|
|
4719
5107
|
//#region src/components/PaginatedSelect/PaginatedSelect.tsx
|
|
4720
|
-
var PaginatedSelect = ({ value, withTitle, filter, setFilter: _setFilter, error, disabled, options = [], anchor: Anchor = SelectFocus, onChange = () => {}, placeholder, renderOptions: _Options = OptionsPaginated, renderItem = Option_default, endReached, ...props }) => {
|
|
5108
|
+
var PaginatedSelect = ({ value, withTitle, filter, "setFilter": _setFilter, error, disabled, options = [], "anchor": Anchor = SelectFocus, onChange = () => {}, placeholder, "renderOptions": _Options = OptionsPaginated, renderItem = Option_default, endReached, id, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, ...props }) => {
|
|
4721
5109
|
const [internalValue, setInternalValue] = (0, react.useState)(value);
|
|
4722
5110
|
const currentValue = value !== void 0 ? value : internalValue;
|
|
4723
5111
|
const option = options.find((option) => option?.value === currentValue);
|
|
@@ -4746,7 +5134,9 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
4746
5134
|
onClick: handleClick,
|
|
4747
5135
|
className: (0, react.useMemo)(() => [error && "invalid", disabled && "disabled"], [error, disabled]),
|
|
4748
5136
|
...props,
|
|
4749
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
5137
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Box_default, {
|
|
5138
|
+
is: "div",
|
|
5139
|
+
"rcx-select__wrapper": true,
|
|
4750
5140
|
display: "flex",
|
|
4751
5141
|
marginInline: "neg-x4",
|
|
4752
5142
|
"rcx-select__wrapper--hidden": !!visibleText,
|
|
@@ -4766,16 +5156,17 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
4766
5156
|
filter,
|
|
4767
5157
|
ref,
|
|
4768
5158
|
"aria-haspopup": "listbox",
|
|
5159
|
+
id,
|
|
5160
|
+
"aria-labelledby": ariaLabelledBy,
|
|
5161
|
+
"aria-describedby": ariaDescribedBy,
|
|
5162
|
+
"aria-invalid": ariaInvalid,
|
|
4769
5163
|
onClick: show,
|
|
4770
5164
|
onBlur: hide
|
|
4771
5165
|
}),
|
|
4772
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
size: "x20"
|
|
4777
|
-
}) })
|
|
4778
|
-
})
|
|
5166
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectAddon, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
5167
|
+
name: visible === AnimatedVisibility.VISIBLE ? "chevron-up" : "chevron-down",
|
|
5168
|
+
size: "x20"
|
|
5169
|
+
}) })
|
|
4779
5170
|
]
|
|
4780
5171
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PositionAnimated, {
|
|
4781
5172
|
visible,
|
|
@@ -4798,16 +5189,13 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
4798
5189
|
//#region src/components/PaginatedSelect/PaginatedSelectFiltered.tsx
|
|
4799
5190
|
var PaginatedSelectFiltered = ({ filter, setFilter, options, placeholder, ...props }) => {
|
|
4800
5191
|
const anchor = (0, react.useMemo)(() => ({ filter, onChange: _onChange, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Input, {
|
|
4801
|
-
|
|
4802
|
-
flexGrow: 1,
|
|
4803
|
-
className: "rcx-select__focus",
|
|
5192
|
+
className: "rcx-select__focus rcx-select__filter rcx-input-box--undecorated",
|
|
4804
5193
|
placeholder,
|
|
4805
5194
|
value: filter,
|
|
4806
5195
|
onChange: (e) => {
|
|
4807
5196
|
setFilter(e.currentTarget.value);
|
|
4808
5197
|
},
|
|
4809
|
-
...props
|
|
4810
|
-
"rcx-input-box--undecorated": true
|
|
5198
|
+
...props
|
|
4811
5199
|
}), [placeholder, setFilter]);
|
|
4812
5200
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PaginatedSelect, {
|
|
4813
5201
|
placeholder: void 0,
|
|
@@ -4819,7 +5207,7 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
4819
5207
|
};
|
|
4820
5208
|
//#endregion
|
|
4821
5209
|
//#region src/components/PaginatedSelect/PaginatedMultiSelect.tsx
|
|
4822
|
-
var PaginatedMultiSelect = ({ withTitle, value, filter, options = [], error, disabled, anchor: Anchor = SelectFocus, onChange = () => {}, placeholder, renderOptions: OptionsComponent = OptionsPaginated, renderItem = Option_default, endReached, ...props }) => {
|
|
5210
|
+
var PaginatedMultiSelect = ({ withTitle, value, filter, options = [], error, disabled, "anchor": Anchor = SelectFocus, onChange = () => {}, placeholder, "renderOptions": OptionsComponent = OptionsPaginated, renderItem = Option_default, endReached, id, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, ...props }) => {
|
|
4823
5211
|
const [internalValue, setInternalValue] = (0, react.useState)(value || []);
|
|
4824
5212
|
const currentValue = value !== void 0 ? value : internalValue;
|
|
4825
5213
|
const selectedOptions = options.filter((option) => currentValue.some((opt) => opt.value === option.value));
|
|
@@ -4867,37 +5255,38 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
4867
5255
|
inline: "x4",
|
|
4868
5256
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FlexContainer, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
4869
5257
|
is: "div",
|
|
4870
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.
|
|
5258
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Box_default, {
|
|
4871
5259
|
is: "div",
|
|
4872
5260
|
display: "flex",
|
|
4873
5261
|
alignItems: "center",
|
|
4874
5262
|
flexWrap: "wrap",
|
|
4875
|
-
margin: "-
|
|
5263
|
+
margin: "neg-x4",
|
|
5264
|
+
gap: 8,
|
|
4876
5265
|
role: "listbox",
|
|
4877
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
})
|
|
5266
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Anchor, {
|
|
5267
|
+
disabled,
|
|
5268
|
+
ref,
|
|
5269
|
+
"aria-haspopup": "listbox",
|
|
5270
|
+
id,
|
|
5271
|
+
"aria-labelledby": ariaLabelledBy,
|
|
5272
|
+
"aria-describedby": ariaDescribedBy,
|
|
5273
|
+
"aria-invalid": ariaInvalid,
|
|
5274
|
+
onClick: show,
|
|
5275
|
+
onBlur: hide,
|
|
5276
|
+
order: 1,
|
|
5277
|
+
"rcx-input-box--undecorated": true,
|
|
5278
|
+
children: placeholder ?? null
|
|
5279
|
+
}), selectedOptions.map(({ value, label }, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Chip_default, {
|
|
5280
|
+
className: "rcx-select__chip",
|
|
5281
|
+
title: withTitle ? label : void 0,
|
|
5282
|
+
tabIndex: -1,
|
|
5283
|
+
role: "option",
|
|
5284
|
+
onClick: (e) => {
|
|
5285
|
+
prevent(e);
|
|
5286
|
+
removeOption(value);
|
|
5287
|
+
},
|
|
5288
|
+
children: label
|
|
5289
|
+
}, value ?? index))]
|
|
4901
5290
|
})
|
|
4902
5291
|
}) })
|
|
4903
5292
|
})
|
|
@@ -4905,13 +5294,10 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
4905
5294
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(FlexItem, {
|
|
4906
5295
|
grow: 0,
|
|
4907
5296
|
shrink: 0,
|
|
4908
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
size: "x20"
|
|
4913
|
-
}) })
|
|
4914
|
-
})
|
|
5297
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectAddon, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
5298
|
+
name: visible === AnimatedVisibility.VISIBLE ? "cross" : "chevron-down",
|
|
5299
|
+
size: "x20"
|
|
5300
|
+
}) })
|
|
4915
5301
|
}),
|
|
4916
5302
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PositionAnimated, {
|
|
4917
5303
|
visible,
|
|
@@ -4937,14 +5323,14 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
4937
5323
|
//#endregion
|
|
4938
5324
|
//#region src/components/PaginatedSelect/PaginatedMultiSelectFiltered.tsx
|
|
4939
5325
|
var PaginatedMultiSelectFiltered = ({ filter, setFilter, options, placeholder, ...props }) => {
|
|
4940
|
-
const anchor = (0, _rocket_chat_fuselage_hooks.useStableCallback)(({ children: _children, filter, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FlexItem, {
|
|
5326
|
+
const anchor = (0, _rocket_chat_fuselage_hooks.useStableCallback)(({ children: _children, filter, className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FlexItem, {
|
|
4941
5327
|
grow: 1,
|
|
4942
5328
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Input, {
|
|
4943
5329
|
placeholder,
|
|
4944
5330
|
value: filter,
|
|
4945
5331
|
onInput: (e) => setFilter?.(e.currentTarget.value),
|
|
4946
5332
|
...props,
|
|
4947
|
-
"rcx-input-box--undecorated"
|
|
5333
|
+
className: ["rcx-input-box--undecorated", className].filter(Boolean).join(" ")
|
|
4948
5334
|
})
|
|
4949
5335
|
}));
|
|
4950
5336
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PaginatedMultiSelect, {
|
|
@@ -5741,11 +6127,6 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
5741
6127
|
}
|
|
5742
6128
|
//#endregion
|
|
5743
6129
|
//#region src/components/Select/SelectLegacy.tsx
|
|
5744
|
-
var Wrapper = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
5745
|
-
is: "div",
|
|
5746
|
-
"rcx-select__wrapper": true,
|
|
5747
|
-
...props
|
|
5748
|
-
});
|
|
5749
6130
|
var useDidUpdate = (func, deps) => {
|
|
5750
6131
|
const didMount = (0, react.useRef)(false);
|
|
5751
6132
|
const fn = (0, _rocket_chat_fuselage_hooks.useStableCallback)(func);
|
|
@@ -5754,7 +6135,7 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
5754
6135
|
didMount.current = true;
|
|
5755
6136
|
}, deps || []);
|
|
5756
6137
|
};
|
|
5757
|
-
function SelectLegacy({ ref, value, filter, error, disabled, options = [], anchor: Anchor = SelectFocus, onChange = () => {}, getValue = ([value] = ["", ""]) => value, getLabel = ([, label] = ["", ""]) => label, placeholder = "", renderItem, renderSelected: RenderSelected, renderOptions: _Options = Options, addonIcon, customEmpty, ...props }) {
|
|
6138
|
+
function SelectLegacy({ ref, value, filter, error, disabled, options = [], "anchor": Anchor = SelectFocus, onChange = () => {}, getValue = ([value] = ["", ""]) => value, getLabel = ([, label] = ["", ""]) => label, placeholder = "", renderItem, "renderSelected": RenderSelected, "renderOptions": _Options = Options, addonIcon, customEmpty, id, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, ...props }) {
|
|
5758
6139
|
const [internalValue, setInternalValue] = (0, react.useState)(value || "");
|
|
5759
6140
|
const internalChangedByKeyboard = (0, _rocket_chat_fuselage_hooks.useStableCallback)(([value]) => {
|
|
5760
6141
|
setInternalValue(value);
|
|
@@ -5810,7 +6191,9 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
5810
6191
|
onClick: handleClick,
|
|
5811
6192
|
className: (0, react.useMemo)(() => [error && "invalid", disabled && "disabled"], [error, disabled]),
|
|
5812
6193
|
...props,
|
|
5813
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
6194
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Box_default, {
|
|
6195
|
+
is: "div",
|
|
6196
|
+
"rcx-select__wrapper": true,
|
|
5814
6197
|
display: "flex",
|
|
5815
6198
|
marginInline: "neg-x4",
|
|
5816
6199
|
"rcx-select__wrapper--hidden": !!visibleText,
|
|
@@ -5831,6 +6214,10 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
5831
6214
|
})),
|
|
5832
6215
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Anchor, {
|
|
5833
6216
|
ref: anchorRef,
|
|
6217
|
+
id,
|
|
6218
|
+
"aria-labelledby": ariaLabelledBy,
|
|
6219
|
+
"aria-describedby": ariaDescribedBy,
|
|
6220
|
+
"aria-invalid": ariaInvalid,
|
|
5834
6221
|
disabled: disabled ?? false,
|
|
5835
6222
|
onClick: show,
|
|
5836
6223
|
onBlur: hide,
|
|
@@ -5838,13 +6225,10 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
5838
6225
|
onKeyUp: handleKeyUp,
|
|
5839
6226
|
children: !value ? option || placeholder : null
|
|
5840
6227
|
}),
|
|
5841
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
size: "x20"
|
|
5846
|
-
}) })
|
|
5847
|
-
})
|
|
6228
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectAddon, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
6229
|
+
name: visible === AnimatedVisibility.VISIBLE ? "chevron-up" : addonIcon || "chevron-down",
|
|
6230
|
+
size: "x20"
|
|
6231
|
+
}) })
|
|
5848
6232
|
]
|
|
5849
6233
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PositionAnimated, {
|
|
5850
6234
|
visible,
|
|
@@ -5863,162 +6247,299 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
5863
6247
|
});
|
|
5864
6248
|
}
|
|
5865
6249
|
//#endregion
|
|
5866
|
-
//#region src/components/Select/
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
...
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
const { optionProps, isDisabled, isSelected, isFocused } = (0, react_aria.useOption)({ key: item.key }, state, ref);
|
|
5907
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Option_default, {
|
|
5908
|
-
ref,
|
|
5909
|
-
disabled: isDisabled,
|
|
5910
|
-
selected: isSelected,
|
|
5911
|
-
focus: isFocused,
|
|
5912
|
-
label: item.rendered,
|
|
5913
|
-
...optionProps,
|
|
5914
|
-
children: item.rendered
|
|
5915
|
-
}, item.key);
|
|
5916
|
-
}
|
|
5917
|
-
//#endregion
|
|
5918
|
-
//#region src/components/Select/SelectTrigger.tsx
|
|
5919
|
-
function SelectTrigger({ ref, small, error, isDisabled, focus, id, ...props }) {
|
|
5920
|
-
const { buttonProps } = (0, react_aria.useButton)(props, ref);
|
|
5921
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
5922
|
-
...buttonProps,
|
|
5923
|
-
id,
|
|
5924
|
-
animated: true,
|
|
5925
|
-
"rcx-select": true,
|
|
5926
|
-
ref,
|
|
5927
|
-
is: "button",
|
|
5928
|
-
display: "flex",
|
|
5929
|
-
flexDirection: "row",
|
|
5930
|
-
fontScale: "p2",
|
|
5931
|
-
justifyContent: "space-between",
|
|
5932
|
-
"rcx-input-box--small": small,
|
|
5933
|
-
className: [
|
|
5934
|
-
error && "invalid",
|
|
5935
|
-
isDisabled && "disabled",
|
|
5936
|
-
focus && "focus"
|
|
5937
|
-
].filter(Boolean).join(" "),
|
|
5938
|
-
children: props.children
|
|
5939
|
-
});
|
|
5940
|
-
}
|
|
6250
|
+
//#region src/components/Select/useTypeahead.ts
|
|
6251
|
+
var findMatch = (labels, query, start) => {
|
|
6252
|
+
for (let offset = 0; offset < labels.length; offset++) {
|
|
6253
|
+
const index = (start + offset) % labels.length;
|
|
6254
|
+
if (labels[index]?.toLocaleLowerCase().startsWith(query)) return index;
|
|
6255
|
+
}
|
|
6256
|
+
return -1;
|
|
6257
|
+
};
|
|
6258
|
+
/**
|
|
6259
|
+
* Hook that finds the option a user means by typing the start of its label.
|
|
6260
|
+
*
|
|
6261
|
+
* Characters typed within `timeout` of each other build up one query; typing the same character again
|
|
6262
|
+
* cycles through the options that start with it.
|
|
6263
|
+
*
|
|
6264
|
+
* @param timeout - the pause, in milliseconds, after which typing starts a new query
|
|
6265
|
+
* @returns `search`, a stable function that takes the typed character, the option labels and the index of the current option,
|
|
6266
|
+
* and returns the index of the matching option, or -1; `isSearching`, which tells whether a query is still being typed,
|
|
6267
|
+
* so a space can extend it instead of acting on the option; and `reset`, which drops the query once the interaction ends
|
|
6268
|
+
*/
|
|
6269
|
+
var useTypeahead = (timeout = 500) => {
|
|
6270
|
+
const queryRef = (0, react.useRef)("");
|
|
6271
|
+
const lastTypedAtRef = (0, react.useRef)(0);
|
|
6272
|
+
const isSearching = (0, _rocket_chat_fuselage_hooks.useStableCallback)(() => queryRef.current !== "" && Date.now() - lastTypedAtRef.current <= timeout);
|
|
6273
|
+
return {
|
|
6274
|
+
search: (0, _rocket_chat_fuselage_hooks.useStableCallback)((character, labels, current) => {
|
|
6275
|
+
const now = Date.now();
|
|
6276
|
+
if (now - lastTypedAtRef.current > timeout) queryRef.current = "";
|
|
6277
|
+
lastTypedAtRef.current = now;
|
|
6278
|
+
queryRef.current += character.toLocaleLowerCase();
|
|
6279
|
+
const query = queryRef.current;
|
|
6280
|
+
const isRepeatedCharacter = [...query].every((typed) => typed === query[0]);
|
|
6281
|
+
if (query.length > 1 && !isRepeatedCharacter) return findMatch(labels, query, Math.max(current, 0));
|
|
6282
|
+
return findMatch(labels, query[0] ?? "", current + 1);
|
|
6283
|
+
}),
|
|
6284
|
+
isSearching,
|
|
6285
|
+
reset: (0, _rocket_chat_fuselage_hooks.useStableCallback)(() => {
|
|
6286
|
+
queryRef.current = "";
|
|
6287
|
+
})
|
|
6288
|
+
};
|
|
6289
|
+
};
|
|
5941
6290
|
//#endregion
|
|
5942
|
-
//#region src/components/Select/
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
|
|
5948
|
-
|
|
5949
|
-
|
|
6291
|
+
//#region src/components/Select/Select.tsx
|
|
6292
|
+
var PAGE_SIZE = 10;
|
|
6293
|
+
var isTriggerProp = (name) => name.startsWith("aria-") || name.startsWith("data-") || [
|
|
6294
|
+
"className",
|
|
6295
|
+
"title",
|
|
6296
|
+
"autoFocus",
|
|
6297
|
+
"tabIndex"
|
|
6298
|
+
].includes(name);
|
|
6299
|
+
var pickTriggerProps = (props) => Object.fromEntries(Object.entries(props).filter(([name]) => isTriggerProp(name)));
|
|
6300
|
+
var isPrintableCharacter = (event) => event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey;
|
|
6301
|
+
var getLabelText = (element) => Array.from(element?.labels ?? []).map((label) => label.textContent?.trim()).filter(Boolean).join(" ") || void 0;
|
|
6302
|
+
/**
|
|
6303
|
+
* An input for selection of options: a button that opens a listbox of its options, named by a `label` pointing at its `id`
|
|
6304
|
+
* like any other input, or by `aria-label` or `aria-labelledby`.
|
|
6305
|
+
*/
|
|
6306
|
+
function Select({ ref: outerRef, options, value, defaultSelectedKey, onChange, placeholder, error, small, disabled, name, id: idProp, onFocus, onBlur, onKeyDown, ...props }) {
|
|
6307
|
+
const generatedId = (0, react.useId)();
|
|
6308
|
+
const id = idProp ?? generatedId;
|
|
6309
|
+
const listboxId = `${id}-listbox`;
|
|
6310
|
+
const getOptionId = (0, react.useCallback)((index) => `${id}-option-${index}`, [id]);
|
|
6311
|
+
const [uncontrolledValue, setUncontrolledValue] = (0, react.useState)(defaultSelectedKey);
|
|
6312
|
+
const selectedKey = value !== void 0 ? value : uncontrolledValue;
|
|
6313
|
+
const selectedIndex = selectedKey === null || selectedKey === void 0 ? -1 : options.findIndex(([key]) => key === String(selectedKey));
|
|
6314
|
+
const selectedOption = options[selectedIndex];
|
|
6315
|
+
const overlayState = (0, react_stately.useOverlayTriggerState)({});
|
|
6316
|
+
const { active, setActive, focusVisible, setFocusVisible, moveByKeyboard, moveByPointer } = (0, _rocket_chat_fuselage_hooks.useActiveDescendant)();
|
|
6317
|
+
const { search: findByTypeahead, isSearching, reset: resetTypeahead } = useTypeahead();
|
|
6318
|
+
const triggerRef = (0, react.useRef)(null);
|
|
6319
|
+
const { ref: resizeRef, borderBoxSize } = (0, _rocket_chat_fuselage_hooks.useResizeObserver)();
|
|
6320
|
+
const mergedRef = (0, _rocket_chat_fuselage_hooks.useMergedRefs)(outerRef, triggerRef, resizeRef);
|
|
6321
|
+
const [listboxName, setListboxName] = (0, react.useState)();
|
|
6322
|
+
const [triggerFocusVisible, setTriggerFocusVisible] = (0, react.useState)(false);
|
|
6323
|
+
const open = (index, byKeyboard) => {
|
|
6324
|
+
if (disabled || options.length === 0) return;
|
|
6325
|
+
setListboxName(getLabelText(triggerRef.current));
|
|
6326
|
+
overlayState.open();
|
|
6327
|
+
if (byKeyboard) {
|
|
6328
|
+
moveByKeyboard(index);
|
|
6329
|
+
return;
|
|
6330
|
+
}
|
|
6331
|
+
setActive(index);
|
|
6332
|
+
setFocusVisible(false);
|
|
6333
|
+
};
|
|
6334
|
+
const close = () => {
|
|
6335
|
+
overlayState.close();
|
|
6336
|
+
setActive(void 0);
|
|
6337
|
+
resetTypeahead();
|
|
6338
|
+
};
|
|
6339
|
+
const select = (index) => {
|
|
6340
|
+
const option = options[index];
|
|
6341
|
+
close();
|
|
6342
|
+
if (!option || index === selectedIndex) return;
|
|
6343
|
+
setUncontrolledValue(option[0]);
|
|
6344
|
+
onChange?.(option[0]);
|
|
6345
|
+
};
|
|
6346
|
+
const labels = options.map(([key, label]) => label ?? key);
|
|
6347
|
+
const lastIndex = options.length - 1;
|
|
6348
|
+
const activeIndex = active ?? -1;
|
|
6349
|
+
const initialIndex = selectedIndex >= 0 ? selectedIndex : 0;
|
|
6350
|
+
const handleKeyDown = (0, _rocket_chat_fuselage_hooks.useStableCallback)((event) => {
|
|
6351
|
+
onKeyDown?.(event);
|
|
6352
|
+
if (event.defaultPrevented) return;
|
|
6353
|
+
if (event.key === " " && isSearching()) {
|
|
6354
|
+
event.preventDefault();
|
|
6355
|
+
const match = findByTypeahead(event.key, labels, overlayState.isOpen ? activeIndex : selectedIndex);
|
|
6356
|
+
if (match >= 0) {
|
|
6357
|
+
if (overlayState.isOpen) moveByKeyboard(match);
|
|
6358
|
+
else open(match, true);
|
|
6359
|
+
}
|
|
6360
|
+
return;
|
|
6361
|
+
}
|
|
6362
|
+
if (!overlayState.isOpen) {
|
|
6363
|
+
switch (event.key) {
|
|
6364
|
+
case "ArrowDown":
|
|
6365
|
+
case "ArrowUp":
|
|
6366
|
+
case "Enter":
|
|
6367
|
+
case " ":
|
|
6368
|
+
event.preventDefault();
|
|
6369
|
+
open(initialIndex, true);
|
|
6370
|
+
return;
|
|
6371
|
+
case "Home":
|
|
6372
|
+
event.preventDefault();
|
|
6373
|
+
open(0, true);
|
|
6374
|
+
return;
|
|
6375
|
+
case "End":
|
|
6376
|
+
event.preventDefault();
|
|
6377
|
+
open(lastIndex, true);
|
|
6378
|
+
return;
|
|
6379
|
+
}
|
|
6380
|
+
if (isPrintableCharacter(event)) {
|
|
6381
|
+
const match = findByTypeahead(event.key, labels, selectedIndex);
|
|
6382
|
+
if (match >= 0) open(match, true);
|
|
6383
|
+
}
|
|
6384
|
+
return;
|
|
6385
|
+
}
|
|
6386
|
+
switch (event.key) {
|
|
6387
|
+
case "ArrowDown":
|
|
6388
|
+
event.preventDefault();
|
|
6389
|
+
moveByKeyboard(Math.min(activeIndex + 1, lastIndex));
|
|
6390
|
+
return;
|
|
6391
|
+
case "ArrowUp":
|
|
6392
|
+
event.preventDefault();
|
|
6393
|
+
if (event.altKey) {
|
|
6394
|
+
select(activeIndex);
|
|
6395
|
+
return;
|
|
6396
|
+
}
|
|
6397
|
+
moveByKeyboard(Math.max(activeIndex - 1, 0));
|
|
6398
|
+
return;
|
|
6399
|
+
case "Home":
|
|
6400
|
+
event.preventDefault();
|
|
6401
|
+
moveByKeyboard(0);
|
|
6402
|
+
return;
|
|
6403
|
+
case "End":
|
|
6404
|
+
event.preventDefault();
|
|
6405
|
+
moveByKeyboard(lastIndex);
|
|
6406
|
+
return;
|
|
6407
|
+
case "PageDown":
|
|
6408
|
+
event.preventDefault();
|
|
6409
|
+
moveByKeyboard(Math.min(activeIndex + PAGE_SIZE, lastIndex));
|
|
6410
|
+
return;
|
|
6411
|
+
case "PageUp":
|
|
6412
|
+
event.preventDefault();
|
|
6413
|
+
moveByKeyboard(Math.max(activeIndex - PAGE_SIZE, 0));
|
|
6414
|
+
return;
|
|
6415
|
+
case "Enter":
|
|
6416
|
+
case " ":
|
|
6417
|
+
event.preventDefault();
|
|
6418
|
+
select(activeIndex);
|
|
6419
|
+
return;
|
|
6420
|
+
case "Tab":
|
|
6421
|
+
select(activeIndex);
|
|
6422
|
+
return;
|
|
6423
|
+
case "Escape":
|
|
6424
|
+
event.preventDefault();
|
|
6425
|
+
event.stopPropagation();
|
|
6426
|
+
close();
|
|
6427
|
+
return;
|
|
6428
|
+
}
|
|
6429
|
+
if (isPrintableCharacter(event)) {
|
|
6430
|
+
const match = findByTypeahead(event.key, labels, activeIndex);
|
|
6431
|
+
if (match >= 0) moveByKeyboard(match);
|
|
6432
|
+
}
|
|
5950
6433
|
});
|
|
5951
|
-
const
|
|
5952
|
-
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
|
|
5956
|
-
|
|
5957
|
-
|
|
6434
|
+
const handleFocus = (event) => {
|
|
6435
|
+
setTriggerFocusVisible(event.currentTarget.matches?.(":focus-visible") ?? false);
|
|
6436
|
+
onFocus?.(event);
|
|
6437
|
+
};
|
|
6438
|
+
const handleBlur = (event) => {
|
|
6439
|
+
setTriggerFocusVisible(false);
|
|
6440
|
+
close();
|
|
6441
|
+
onBlur?.(event);
|
|
6442
|
+
};
|
|
6443
|
+
const handleMouseDown = (event) => {
|
|
6444
|
+
if (overlayState.isOpen) event.preventDefault();
|
|
6445
|
+
};
|
|
6446
|
+
const handleClick = (event) => {
|
|
6447
|
+
event.currentTarget.focus();
|
|
6448
|
+
if (overlayState.isOpen) {
|
|
6449
|
+
close();
|
|
6450
|
+
return;
|
|
6451
|
+
}
|
|
6452
|
+
open(initialIndex, false);
|
|
6453
|
+
};
|
|
6454
|
+
(0, react.useEffect)(() => {
|
|
6455
|
+
if (!overlayState.isOpen || active === void 0) return;
|
|
6456
|
+
triggerRef.current?.ownerDocument.getElementById(getOptionId(active))?.scrollIntoView?.({ block: "nearest" });
|
|
6457
|
+
}, [
|
|
6458
|
+
overlayState.isOpen,
|
|
6459
|
+
active,
|
|
6460
|
+
getOptionId
|
|
6461
|
+
]);
|
|
6462
|
+
const { isOpen } = overlayState;
|
|
5958
6463
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
5959
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5960
|
-
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
triggerRef: ref,
|
|
5965
|
-
label: props.label,
|
|
5966
|
-
name: props.name,
|
|
5967
|
-
isDisabled
|
|
5968
|
-
})
|
|
6464
|
+
name !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
6465
|
+
type: "hidden",
|
|
6466
|
+
name,
|
|
6467
|
+
disabled,
|
|
6468
|
+
value: selectedKey === null || selectedKey === void 0 ? "" : String(selectedKey)
|
|
5969
6469
|
}),
|
|
5970
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
5971
|
-
...(
|
|
6470
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Box_default, {
|
|
6471
|
+
...pickTriggerProps(props),
|
|
6472
|
+
is: "button",
|
|
6473
|
+
type: "button",
|
|
5972
6474
|
ref: mergedRef,
|
|
5973
|
-
small,
|
|
5974
|
-
focus: isFocusVisible || state.isOpen,
|
|
5975
|
-
error,
|
|
5976
6475
|
id,
|
|
6476
|
+
role: "combobox",
|
|
6477
|
+
"aria-haspopup": "listbox",
|
|
6478
|
+
"aria-expanded": isOpen,
|
|
6479
|
+
"aria-controls": isOpen ? listboxId : void 0,
|
|
6480
|
+
"aria-activedescendant": isOpen && active !== void 0 ? getOptionId(active) : void 0,
|
|
6481
|
+
"aria-invalid": props["aria-invalid"] ?? (error ? true : void 0),
|
|
6482
|
+
disabled,
|
|
6483
|
+
animated: true,
|
|
6484
|
+
"rcx-select": true,
|
|
6485
|
+
display: "flex",
|
|
6486
|
+
flexDirection: "row",
|
|
6487
|
+
fontScale: "p2",
|
|
6488
|
+
justifyContent: "space-between",
|
|
6489
|
+
"rcx-input-box--small": small,
|
|
6490
|
+
className: [
|
|
6491
|
+
error && "invalid",
|
|
6492
|
+
disabled && "disabled",
|
|
6493
|
+
(triggerFocusVisible || isOpen) && "focus",
|
|
6494
|
+
props.className
|
|
6495
|
+
].filter(Boolean).join(" "),
|
|
6496
|
+
onMouseDown: handleMouseDown,
|
|
6497
|
+
onClick: handleClick,
|
|
6498
|
+
onKeyDown: handleKeyDown,
|
|
6499
|
+
onFocus: handleFocus,
|
|
6500
|
+
onBlur: handleBlur,
|
|
5977
6501
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
5978
6502
|
is: "span",
|
|
5979
|
-
color:
|
|
5980
|
-
...valueProps,
|
|
6503
|
+
color: selectedOption ? "titles-labels" : "hint",
|
|
5981
6504
|
...small && { fontScale: "c1" },
|
|
5982
|
-
children:
|
|
6505
|
+
children: selectedOption ? selectedOption[1] ?? selectedOption[0] : placeholder
|
|
5983
6506
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
5984
|
-
|
|
5985
|
-
name: state.isOpen ? "chevron-up" : "chevron-down",
|
|
6507
|
+
name: isOpen ? "chevron-up" : "chevron-down",
|
|
5986
6508
|
size: "x20"
|
|
5987
6509
|
})]
|
|
5988
6510
|
}),
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
placement: "bottom",
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6511
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PositionAnimated, {
|
|
6512
|
+
visible: isOpen ? AnimatedVisibility.VISIBLE : AnimatedVisibility.HIDDEN,
|
|
6513
|
+
anchor: triggerRef,
|
|
6514
|
+
placement: "bottom-start",
|
|
6515
|
+
margin: 4,
|
|
6516
|
+
preventScroll: isOpen,
|
|
6517
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
6518
|
+
"aria-hidden": !isOpen || void 0,
|
|
6519
|
+
style: isOpen ? void 0 : { pointerEvents: "none" },
|
|
6520
|
+
onPointerDown: (event) => event.preventDefault(),
|
|
6521
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OptionContainer, {
|
|
6522
|
+
style: { width: borderBoxSize?.inlineSize },
|
|
6523
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Listbox, {
|
|
6524
|
+
id: listboxId,
|
|
6525
|
+
"aria-labelledby": props["aria-labelledby"],
|
|
6526
|
+
"aria-label": props["aria-labelledby"] ? void 0 : props["aria-label"] ?? listboxName,
|
|
6527
|
+
children: options.map(([key, label], index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ListboxOption_default, {
|
|
6528
|
+
id: getOptionId(index),
|
|
6529
|
+
selected: index === selectedIndex,
|
|
6530
|
+
active: index === active,
|
|
6531
|
+
focusVisible,
|
|
6532
|
+
onActivate: () => moveByPointer(index),
|
|
6533
|
+
onSelect: () => select(index),
|
|
6534
|
+
children: label ?? key
|
|
6535
|
+
}, key))
|
|
6536
|
+
})
|
|
6000
6537
|
})
|
|
6001
6538
|
})
|
|
6002
6539
|
})
|
|
6003
6540
|
] });
|
|
6004
6541
|
}
|
|
6005
6542
|
//#endregion
|
|
6006
|
-
//#region src/components/Select/Select.tsx
|
|
6007
|
-
/**
|
|
6008
|
-
* An input for selection of options.
|
|
6009
|
-
*/
|
|
6010
|
-
function Select({ options, ref, ...props }) {
|
|
6011
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectAria, {
|
|
6012
|
-
ref,
|
|
6013
|
-
...props,
|
|
6014
|
-
children: options.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_stately.Item, {
|
|
6015
|
-
title: option[1] ?? option[0],
|
|
6016
|
-
textValue: option[0],
|
|
6017
|
-
children: option[1] ?? option[0]
|
|
6018
|
-
}, option[0]))
|
|
6019
|
-
});
|
|
6020
|
-
}
|
|
6021
|
-
//#endregion
|
|
6022
6543
|
//#region src/components/Select/SelectFilteredContext.ts
|
|
6023
6544
|
var SelectFilteredContext = (0, react.createContext)({});
|
|
6024
6545
|
//#endregion
|
|
@@ -6026,14 +6547,11 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
6026
6547
|
function SelectFilteredAnchor({ children: _children, ...props }) {
|
|
6027
6548
|
const { placeholder, filter, setFilter } = (0, react.use)(SelectFilteredContext);
|
|
6028
6549
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Input, {
|
|
6029
|
-
|
|
6030
|
-
flexGrow: 1,
|
|
6031
|
-
className: "rcx-select__focus",
|
|
6550
|
+
className: "rcx-select__focus rcx-select__filter rcx-input-box--undecorated",
|
|
6032
6551
|
placeholder,
|
|
6033
6552
|
value: filter,
|
|
6034
6553
|
onInput: (e) => setFilter?.(e.currentTarget.value),
|
|
6035
|
-
...props
|
|
6036
|
-
"rcx-input-box--undecorated": true
|
|
6554
|
+
...props
|
|
6037
6555
|
});
|
|
6038
6556
|
}
|
|
6039
6557
|
//#endregion
|
|
@@ -6163,7 +6681,7 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
6163
6681
|
//#region src/components/Sidebar/SidebarAction.tsx
|
|
6164
6682
|
function SidebarAction(props) {
|
|
6165
6683
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconButton, {
|
|
6166
|
-
|
|
6684
|
+
size: "small",
|
|
6167
6685
|
...props
|
|
6168
6686
|
});
|
|
6169
6687
|
}
|
|
@@ -6174,47 +6692,64 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
6174
6692
|
}
|
|
6175
6693
|
//#endregion
|
|
6176
6694
|
//#region src/components/Sidebar/SidebarLink.tsx
|
|
6177
|
-
var SidebarLink = ({ selected, icon, badge, menu, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
6695
|
+
var SidebarLink = ({ selected, icon, badge, menu, className, children, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Item, {
|
|
6696
|
+
is: "a",
|
|
6697
|
+
inset: "md",
|
|
6178
6698
|
role: "link",
|
|
6179
6699
|
tabIndex: 0,
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
"rcx-sidebar-link",
|
|
6183
|
-
"rcx-sidebar-item",
|
|
6184
|
-
selected && "rcx-sidebar-item--selected"
|
|
6185
|
-
].filter(Boolean).join(" "),
|
|
6700
|
+
selected,
|
|
6701
|
+
className: cx("rcx-sidebar-link", "rcx-sidebar-item", !!selected && "rcx-sidebar-item--selected", className),
|
|
6186
6702
|
onClick: (e) => e.stopPropagation(),
|
|
6187
6703
|
onKeyDown: (e) => e.code === "Enter" && e.stopPropagation(),
|
|
6188
6704
|
...props,
|
|
6189
6705
|
children: [
|
|
6190
|
-
icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6191
|
-
|
|
6192
|
-
|
|
6193
|
-
|
|
6706
|
+
icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemIcon, {
|
|
6707
|
+
className: "rcx-sidebar-item__icon",
|
|
6708
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
6709
|
+
name: icon,
|
|
6710
|
+
size: "x20"
|
|
6711
|
+
})
|
|
6194
6712
|
}),
|
|
6195
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6196
|
-
|
|
6197
|
-
|
|
6713
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemTitle, {
|
|
6714
|
+
is: "span",
|
|
6715
|
+
className: "rcx-sidebar-item__title",
|
|
6716
|
+
children
|
|
6198
6717
|
}),
|
|
6199
6718
|
badge,
|
|
6200
|
-
menu &&
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
6719
|
+
menu && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemActions, {
|
|
6720
|
+
reveal: "hover",
|
|
6721
|
+
className: "rcx-sidebar-item__menu-wrapper",
|
|
6722
|
+
children: patchChildren(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6723
|
+
className: "rcx-box rcx-box--full rcx-sidebar-item__menu",
|
|
6724
|
+
children: menu
|
|
6725
|
+
}), (childProps) => ({ className: appendClassName(childProps.className, "rcx-sidebar-item__menu") }))
|
|
6726
|
+
})
|
|
6204
6727
|
]
|
|
6205
6728
|
});
|
|
6206
6729
|
//#endregion
|
|
6207
6730
|
//#region src/components/Sidebar/SidebarItem/SidebarItem.tsx
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6731
|
+
/**
|
|
6732
|
+
* A sidebar row. It renders an `Item`, so its content can also be composed from `Item` parts.
|
|
6733
|
+
*/
|
|
6734
|
+
var SidebarItem = ({ selected, highlighted, focused, focusVisible, level = 1, className, is = "a", href, target, rel, download, ...props }) => {
|
|
6735
|
+
const isContainer = typeof is === "string" && is !== "a";
|
|
6736
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Item, {
|
|
6737
|
+
...props,
|
|
6738
|
+
...!isContainer && {
|
|
6739
|
+
href,
|
|
6740
|
+
target,
|
|
6741
|
+
rel,
|
|
6742
|
+
download
|
|
6743
|
+
},
|
|
6744
|
+
is,
|
|
6745
|
+
inset: "md",
|
|
6746
|
+
selected,
|
|
6747
|
+
highlighted,
|
|
6748
|
+
focused,
|
|
6749
|
+
focusVisible,
|
|
6750
|
+
className: cx("rcx-sidebar-item", !!selected && "rcx-sidebar-item--selected", !!level && `rcx-sidebar-item--level-${level}`, className)
|
|
6751
|
+
});
|
|
6752
|
+
};
|
|
6218
6753
|
//#endregion
|
|
6219
6754
|
//#region src/components/Sidebar/SidebarItem/SidebarItemAction.tsx
|
|
6220
6755
|
var SidebarItemAction = ({ children, className, icon = "plus-small", ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -6228,10 +6763,20 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
6228
6763
|
}), children]
|
|
6229
6764
|
});
|
|
6230
6765
|
//#endregion
|
|
6766
|
+
//#region src/components/Sidebar/SidebarItem/SidebarItemActions.tsx
|
|
6767
|
+
/**
|
|
6768
|
+
* Always-visible buttons of a container `SidebarItem`, such as accepting or rejecting a call.
|
|
6769
|
+
* For actions shown only on hover, use `SidebarItemMenu`.
|
|
6770
|
+
*/
|
|
6771
|
+
var SidebarItemActions = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemActions, {
|
|
6772
|
+
...props,
|
|
6773
|
+
className: cx("rcx-sidebar-item__actions", className)
|
|
6774
|
+
});
|
|
6775
|
+
//#endregion
|
|
6231
6776
|
//#region src/components/Sidebar/SidebarItem/SidebarItemAvatarWrapper.tsx
|
|
6232
|
-
var SidebarItemAvatarWrapper = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6233
|
-
|
|
6234
|
-
|
|
6777
|
+
var SidebarItemAvatarWrapper = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemMedia, {
|
|
6778
|
+
...props,
|
|
6779
|
+
className: cx("rcx-sidebar-item__avatar", className)
|
|
6235
6780
|
});
|
|
6236
6781
|
//#endregion
|
|
6237
6782
|
//#region src/components/Sidebar/SidebarItem/SidebarItemBadge.tsx
|
|
@@ -6241,12 +6786,9 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
6241
6786
|
});
|
|
6242
6787
|
//#endregion
|
|
6243
6788
|
//#region src/components/Sidebar/SidebarItem/SidebarItemIcon.tsx
|
|
6244
|
-
var SidebarItemIcon = ({ icon, className, highlighted, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
highlighted && "rcx-sidebar-item__icon--highlighted",
|
|
6248
|
-
className
|
|
6249
|
-
].filter(Boolean).join(" "),
|
|
6789
|
+
var SidebarItemIcon = ({ icon, className, highlighted, label, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemIcon, {
|
|
6790
|
+
label,
|
|
6791
|
+
className: cx("rcx-sidebar-item__icon", !!highlighted && "rcx-sidebar-item__icon--highlighted", typeof className === "string" && className),
|
|
6250
6792
|
children: (0, react.isValidElement)(icon) ? icon : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
6251
6793
|
name: icon,
|
|
6252
6794
|
size: "x20",
|
|
@@ -6254,10 +6796,21 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
6254
6796
|
})
|
|
6255
6797
|
});
|
|
6256
6798
|
//#endregion
|
|
6799
|
+
//#region src/components/Sidebar/SidebarItem/SidebarItemLink.tsx
|
|
6800
|
+
/**
|
|
6801
|
+
* The primary target of a container `SidebarItem` (`is='div'`). Place it inside `SidebarItemTitle`:
|
|
6802
|
+
* it covers the whole row, so menus and buttons sit beside it instead of inside it.
|
|
6803
|
+
*/
|
|
6804
|
+
var SidebarItemLink = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemLink, {
|
|
6805
|
+
...props,
|
|
6806
|
+
className: cx("rcx-sidebar-item__link", className)
|
|
6807
|
+
});
|
|
6808
|
+
//#endregion
|
|
6257
6809
|
//#region src/components/Sidebar/SidebarItem/SidebarItemMenu.tsx
|
|
6258
|
-
var SidebarItemMenu = ({ children, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6259
|
-
className: "rcx-box rcx-box--full rcx-sidebar-item__menu-wrapper rcx-box--animated",
|
|
6810
|
+
var SidebarItemMenu = ({ children, className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemActions, {
|
|
6260
6811
|
...props,
|
|
6812
|
+
reveal: "hover",
|
|
6813
|
+
className: cx("rcx-sidebar-item__menu-wrapper", className),
|
|
6261
6814
|
children: patchChildren(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6262
6815
|
className: "rcx-box rcx-box--full rcx-sidebar-item__menu",
|
|
6263
6816
|
children
|
|
@@ -6265,35 +6818,27 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
6265
6818
|
});
|
|
6266
6819
|
//#endregion
|
|
6267
6820
|
//#region src/components/Sidebar/SidebarItem/SidebarItemTitle.tsx
|
|
6268
|
-
var SidebarItemTitle = ({ className, unread, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
unread && "rcx-sidebar-item__title--highlighted",
|
|
6272
|
-
className
|
|
6273
|
-
].filter(Boolean).join(" "),
|
|
6274
|
-
...props
|
|
6821
|
+
var SidebarItemTitle = ({ className, unread, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemTitle, {
|
|
6822
|
+
...props,
|
|
6823
|
+
className: cx("rcx-sidebar-item__title", !!unread && "rcx-sidebar-item__title--highlighted", className)
|
|
6275
6824
|
});
|
|
6276
6825
|
//#endregion
|
|
6277
6826
|
//#region src/components/Sidebar/SidebarItem/SidebarItemRow.tsx
|
|
6278
|
-
var SidebarItemRow = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6279
|
-
|
|
6280
|
-
|
|
6827
|
+
var SidebarItemRow = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemRow, {
|
|
6828
|
+
...props,
|
|
6829
|
+
className: cx("rcx-sidebar-item__row", className)
|
|
6281
6830
|
});
|
|
6282
6831
|
//#endregion
|
|
6283
6832
|
//#region src/components/Sidebar/SidebarItem/SidebarItemCol.tsx
|
|
6284
|
-
var SidebarItemCol = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6285
|
-
|
|
6286
|
-
|
|
6833
|
+
var SidebarItemCol = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemContent, {
|
|
6834
|
+
...props,
|
|
6835
|
+
className: cx("rcx-sidebar-item__col", className)
|
|
6287
6836
|
});
|
|
6288
6837
|
//#endregion
|
|
6289
6838
|
//#region src/components/Sidebar/SidebarItem/SidebarItemTimestamp.tsx
|
|
6290
|
-
var SidebarItemTimestamp = ({ className, unread, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
unread && "rcx-sidebar-item__timestamp--highlighted",
|
|
6294
|
-
className
|
|
6295
|
-
].filter(Boolean).join(" "),
|
|
6296
|
-
...props
|
|
6839
|
+
var SidebarItemTimestamp = ({ className, unread, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemMeta, {
|
|
6840
|
+
...props,
|
|
6841
|
+
className: cx("rcx-sidebar-item__timestamp", !!unread && "rcx-sidebar-item__timestamp--highlighted", className)
|
|
6297
6842
|
});
|
|
6298
6843
|
//#endregion
|
|
6299
6844
|
//#region src/components/Sidebar/SidebarItem/SidebarListItem.tsx
|
|
@@ -6307,13 +6852,9 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
6307
6852
|
}
|
|
6308
6853
|
//#endregion
|
|
6309
6854
|
//#region src/components/Sidebar/SidebarItem/SidebarItemContent.tsx
|
|
6310
|
-
var SidebarItemContent = ({ className, unread, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6311
|
-
|
|
6312
|
-
|
|
6313
|
-
unread && "rcx-sidebar-item__subtitle--highlighted",
|
|
6314
|
-
className
|
|
6315
|
-
].filter(Boolean).join(" "),
|
|
6316
|
-
...props
|
|
6855
|
+
var SidebarItemContent = ({ className, unread, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemDescription, {
|
|
6856
|
+
...props,
|
|
6857
|
+
className: cx("rcx-sidebar-item__subtitle", !!unread && "rcx-sidebar-item__subtitle--highlighted", className)
|
|
6317
6858
|
});
|
|
6318
6859
|
//#endregion
|
|
6319
6860
|
//#region src/components/StatusBullet/icons/Away.tsx
|
|
@@ -6398,7 +6939,7 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
6398
6939
|
cx: "6",
|
|
6399
6940
|
cy: "6",
|
|
6400
6941
|
r: "5",
|
|
6401
|
-
className:
|
|
6942
|
+
className: "rcx-status-bullet rcx-status-bullet--offline",
|
|
6402
6943
|
strokeWidth: "2"
|
|
6403
6944
|
})
|
|
6404
6945
|
});
|
|
@@ -6431,28 +6972,27 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
6431
6972
|
};
|
|
6432
6973
|
//#endregion
|
|
6433
6974
|
//#region src/components/Sidebar/SidebarItem/SidebarItemStatusBullet.tsx
|
|
6434
|
-
var SidebarItemStatusBullet = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6435
|
-
className: "rcx-
|
|
6975
|
+
var SidebarItemStatusBullet = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemIcon, {
|
|
6976
|
+
className: "rcx-sidebar-item__status-bullet",
|
|
6436
6977
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StatusBullet, { ...props })
|
|
6437
6978
|
});
|
|
6438
6979
|
//#endregion
|
|
6439
6980
|
//#region src/components/Sidebar/SidebarGroupTitle.tsx
|
|
6440
|
-
|
|
6441
|
-
|
|
6442
|
-
|
|
6443
|
-
|
|
6444
|
-
!expanded && empty && "rcx-sidebar-collapse-group__bar--empty",
|
|
6445
|
-
!expanded && badge && "rcx-sidebar-collapse-group__bar--unread"
|
|
6446
|
-
].filter(Boolean).join(" "),
|
|
6981
|
+
/**
|
|
6982
|
+
* The header of a sidebar group. It renders an `ItemGroupHeader`, so its menu reveals on hover like a row's.
|
|
6983
|
+
*/
|
|
6984
|
+
var SidebarGroupTitle = ({ title, titleId, badge, menu, barProps, expanded, empty, role, className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(ItemGroupHeader, {
|
|
6447
6985
|
...props,
|
|
6448
|
-
|
|
6449
|
-
|
|
6986
|
+
inset: "md",
|
|
6987
|
+
className: cx("rcx-sidebar-collapse-group__bar", !expanded && empty && "rcx-sidebar-collapse-group__bar--empty", !expanded && !!badge && "rcx-sidebar-collapse-group__bar--unread", className),
|
|
6988
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(ItemGroupTitle, {
|
|
6450
6989
|
role,
|
|
6451
6990
|
...barProps,
|
|
6991
|
+
className: "rcx-sidebar-collapse-group__bar-button",
|
|
6452
6992
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6453
|
-
className: "rcx-
|
|
6993
|
+
className: "rcx-sidebar-collapse-group__heading",
|
|
6454
6994
|
children: [title && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h4", {
|
|
6455
|
-
className: "rcx-
|
|
6995
|
+
className: "rcx-sidebar-collapse-group__title",
|
|
6456
6996
|
id: titleId,
|
|
6457
6997
|
children: title
|
|
6458
6998
|
}), expanded !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Chevron, {
|
|
@@ -6464,7 +7004,7 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
6464
7004
|
});
|
|
6465
7005
|
//#endregion
|
|
6466
7006
|
//#region src/components/Sidebar/SidebarCollapseGroup.tsx
|
|
6467
|
-
function SidebarCollapseGroup({ ref, expanded: propExpanded, defaultExpanded, tabIndex, children, badge, menu, title, empty, role = "group", ...props }) {
|
|
7007
|
+
function SidebarCollapseGroup({ ref, expanded: propExpanded, defaultExpanded, tabIndex, children, badge, menu, actions: _actions, title, empty, role = "group", ...props }) {
|
|
6468
7008
|
const { barProps, expanded, panelExpanded, panelId, titleId } = useCollapse({
|
|
6469
7009
|
expanded: propExpanded,
|
|
6470
7010
|
defaultExpanded,
|
|
@@ -6485,10 +7025,11 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
6485
7025
|
menu,
|
|
6486
7026
|
barProps,
|
|
6487
7027
|
role: "button"
|
|
6488
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
7028
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemGroup, {
|
|
6489
7029
|
role: "list",
|
|
7030
|
+
"aria-labelledby": titleId,
|
|
6490
7031
|
ref,
|
|
6491
|
-
className:
|
|
7032
|
+
className: cx("rcx-sidebar-collapse-group__panel rcx-box--animated", panelExpanded && "rcx-sidebar-collapse-group__panel--expanded"),
|
|
6492
7033
|
id: panelId,
|
|
6493
7034
|
children
|
|
6494
7035
|
})]
|
|
@@ -6496,9 +7037,10 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
6496
7037
|
}
|
|
6497
7038
|
//#endregion
|
|
6498
7039
|
//#region src/components/Sidebar/SidebarCollapseGroupMenu.tsx
|
|
6499
|
-
var SidebarCollapseGroupMenu = ({ children, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6500
|
-
className: "rcx-box rcx-box--full rcx-sidebar-collapse-group__menu-wrapper rcx-box--animated",
|
|
7040
|
+
var SidebarCollapseGroupMenu = ({ children, className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemActions, {
|
|
6501
7041
|
...props,
|
|
7042
|
+
reveal: "hover",
|
|
7043
|
+
className: cx("rcx-sidebar-collapse-group__menu-wrapper", className),
|
|
6502
7044
|
children: patchChildren(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6503
7045
|
className: "rcx-box rcx-box--full rcx-sidebar-collapse-group__menu",
|
|
6504
7046
|
children
|
|
@@ -6527,7 +7069,7 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
6527
7069
|
className: "rcx-box rcx-box--full rcx-sidebar-banner__addon",
|
|
6528
7070
|
children: [addon, onClose && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconButton, {
|
|
6529
7071
|
onClick: onClose,
|
|
6530
|
-
|
|
7072
|
+
size: "tiny",
|
|
6531
7073
|
icon: "cross"
|
|
6532
7074
|
})]
|
|
6533
7075
|
})]
|
|
@@ -6581,10 +7123,9 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
6581
7123
|
});
|
|
6582
7124
|
//#endregion
|
|
6583
7125
|
//#region src/components/Sidebar/SidebarDivider.tsx
|
|
6584
|
-
var SidebarDivider = () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6585
|
-
"
|
|
6586
|
-
|
|
6587
|
-
marginBlockEnd: 0
|
|
7126
|
+
var SidebarDivider = () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemDivider, {
|
|
7127
|
+
role: "separator",
|
|
7128
|
+
className: "rcx-sidebar--divider"
|
|
6588
7129
|
});
|
|
6589
7130
|
//#endregion
|
|
6590
7131
|
//#region src/components/Sidebar/SidebarSection.tsx
|
|
@@ -6617,28 +7158,21 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
6617
7158
|
...props
|
|
6618
7159
|
});
|
|
6619
7160
|
//#endregion
|
|
6620
|
-
//#region src/components/Sidepanel/SidepanelDivider.tsx
|
|
6621
|
-
var SidepanelDivider = () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Divider, {
|
|
6622
|
-
"rcx-sidepanel--divider": true,
|
|
6623
|
-
marginBlockStart: -2,
|
|
6624
|
-
marginBlockEnd: 0
|
|
6625
|
-
});
|
|
6626
|
-
//#endregion
|
|
6627
7161
|
//#region src/components/Sidepanel/SidepanelHeader.tsx
|
|
6628
7162
|
var SidepanelHeader = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6629
7163
|
className: "rcx-sidepanel-header-wrapper",
|
|
6630
7164
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6631
7165
|
className: ["rcx-sidepanel-header", className].filter(Boolean).join(" "),
|
|
6632
7166
|
...props
|
|
6633
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
7167
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Divider, { className: "rcx-sidepanel--divider" })]
|
|
6634
7168
|
});
|
|
6635
7169
|
//#endregion
|
|
6636
7170
|
//#region src/components/Sidepanel/SidepanelList.tsx
|
|
6637
7171
|
function SidepanelList({ className, ...props }) {
|
|
6638
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
7172
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemGroup, {
|
|
6639
7173
|
role: "list",
|
|
6640
|
-
|
|
6641
|
-
|
|
7174
|
+
...props,
|
|
7175
|
+
className: cx("rcx-sidepanel-list", className)
|
|
6642
7176
|
});
|
|
6643
7177
|
}
|
|
6644
7178
|
//#endregion
|
|
@@ -6651,6 +7185,12 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
6651
7185
|
});
|
|
6652
7186
|
}
|
|
6653
7187
|
//#endregion
|
|
7188
|
+
//#region src/components/Sidepanel/SidepanelDivider.tsx
|
|
7189
|
+
var SidepanelDivider = () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItemDivider, {
|
|
7190
|
+
role: "separator",
|
|
7191
|
+
className: "rcx-sidepanel--divider"
|
|
7192
|
+
});
|
|
7193
|
+
//#endregion
|
|
6654
7194
|
//#region src/components/SplitButton/SplitButton.tsx
|
|
6655
7195
|
/**
|
|
6656
7196
|
* Fuses a menu trigger and its primary action into a single control, e.g. an
|
|
@@ -6677,23 +7217,48 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
6677
7217
|
* The ghost segment of a `SplitButton`: the menu trigger fused next to the
|
|
6678
7218
|
* primary action. Pass it as a `Menu`'s `button`.
|
|
6679
7219
|
*/
|
|
6680
|
-
function SplitButtonTrigger(props) {
|
|
7220
|
+
function SplitButtonTrigger({ className, ...props }) {
|
|
6681
7221
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconButton, {
|
|
6682
|
-
|
|
7222
|
+
...props,
|
|
7223
|
+
className: ["rcx-split-button__trigger", className].filter(Boolean).join(" ")
|
|
7224
|
+
});
|
|
7225
|
+
}
|
|
7226
|
+
//#endregion
|
|
7227
|
+
//#region src/components/Stack/Stack.tsx
|
|
7228
|
+
var flexValues = {
|
|
7229
|
+
start: "flex-start",
|
|
7230
|
+
end: "flex-end"
|
|
7231
|
+
};
|
|
7232
|
+
/**
|
|
7233
|
+
* Lays out its children in a row or a column, spaced by `gap`.
|
|
7234
|
+
*/
|
|
7235
|
+
function Stack({ direction = "column", gap, align, justify, wrap, grow, ...props }) {
|
|
7236
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
7237
|
+
display: "flex",
|
|
7238
|
+
flexDirection: direction,
|
|
7239
|
+
gap,
|
|
7240
|
+
alignItems: align && (flexValues[align] ?? align),
|
|
7241
|
+
justifyContent: justify && (flexValues[justify] ?? justify),
|
|
7242
|
+
flexWrap: wrap ? "wrap" : void 0,
|
|
7243
|
+
flexGrow: grow ? 1 : void 0,
|
|
6683
7244
|
...props
|
|
6684
7245
|
});
|
|
6685
7246
|
}
|
|
6686
7247
|
//#endregion
|
|
6687
7248
|
//#region src/components/Table/Table.tsx
|
|
6688
|
-
var Table = ({ striped, sticky, fixed = false, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
7249
|
+
var Table = ({ striped, sticky, fixed = false, columns, children, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
6689
7250
|
"rcx-table__wrapper": true,
|
|
6690
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.
|
|
7251
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Box_default, {
|
|
6691
7252
|
is: "table",
|
|
6692
7253
|
"rcx-table": true,
|
|
6693
7254
|
"rcx-table--fixed": fixed,
|
|
6694
7255
|
"rcx-table--sticky": sticky,
|
|
6695
7256
|
"rcx-table--striped": striped,
|
|
6696
|
-
...props
|
|
7257
|
+
...props,
|
|
7258
|
+
children: [columns && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("colgroup", { children: columns.map((width, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
7259
|
+
is: "col",
|
|
7260
|
+
width
|
|
7261
|
+
}, index)) }), children]
|
|
6697
7262
|
})
|
|
6698
7263
|
});
|
|
6699
7264
|
//#endregion
|
|
@@ -6716,7 +7281,7 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
6716
7281
|
});
|
|
6717
7282
|
//#endregion
|
|
6718
7283
|
//#region src/components/Table/TableCell.tsx
|
|
6719
|
-
var TableCell = ({ align, clickable, children, ...props }) => {
|
|
7284
|
+
var TableCell = ({ align, clickable, rowHeader, truncate, color, strong, children, ...props }) => {
|
|
6720
7285
|
const isInsideHead = (0, react.useContext)(TableHeadContext);
|
|
6721
7286
|
const innerElement = children ?? (!isInsideHead ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
6722
7287
|
display: "inline-block",
|
|
@@ -6725,11 +7290,16 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
6725
7290
|
borderWidth: "default"
|
|
6726
7291
|
}) : void 0);
|
|
6727
7292
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
6728
|
-
is: isInsideHead ? "th" : "td",
|
|
7293
|
+
is: isInsideHead || rowHeader ? "th" : "td",
|
|
7294
|
+
scope: rowHeader ? "row" : void 0,
|
|
6729
7295
|
"rcx-table__cell": true,
|
|
6730
7296
|
"rcx-table__cell--align": align,
|
|
6731
7297
|
"rcx-table__cell--header": isInsideHead,
|
|
7298
|
+
"rcx-table__cell--row-header": rowHeader,
|
|
6732
7299
|
"rcx-table__cell--clickable": clickable,
|
|
7300
|
+
"rcx-table__cell--truncate": truncate,
|
|
7301
|
+
"rcx-table__cell--color": color,
|
|
7302
|
+
"rcx-table__cell--strong": strong,
|
|
6733
7303
|
...props,
|
|
6734
7304
|
children: innerElement
|
|
6735
7305
|
});
|
|
@@ -6775,10 +7345,10 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
6775
7345
|
});
|
|
6776
7346
|
//#endregion
|
|
6777
7347
|
//#region src/components/Table/TableSelection/TableSelectionButton.tsx
|
|
6778
|
-
var TableSelectionButton = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
6779
|
-
|
|
6780
|
-
|
|
6781
|
-
|
|
7348
|
+
var TableSelectionButton = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
7349
|
+
size: "small",
|
|
7350
|
+
...props,
|
|
7351
|
+
className: ["rcx-table__selection-button", className].filter(Boolean).join(" ")
|
|
6782
7352
|
});
|
|
6783
7353
|
//#endregion
|
|
6784
7354
|
//#region src/components/Table/TableSelection/TableSelectionButtonGroup.tsx
|
|
@@ -6788,11 +7358,12 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
6788
7358
|
/**
|
|
6789
7359
|
* Tabs is a component to navigate around the UI using buttons arranged together with the selected tab highlighted.
|
|
6790
7360
|
*/
|
|
6791
|
-
function Tabs({ children, divider = true, ...props }) {
|
|
7361
|
+
function Tabs({ children, divider = true, stretch, ...props }) {
|
|
6792
7362
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
6793
7363
|
is: "div",
|
|
6794
7364
|
"rcx-tabs": true,
|
|
6795
7365
|
"rcx-tabs--with-divider": divider,
|
|
7366
|
+
"rcx-tabs--stretch": stretch,
|
|
6796
7367
|
...props,
|
|
6797
7368
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
6798
7369
|
is: "div",
|
|
@@ -6821,6 +7392,17 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
6821
7392
|
});
|
|
6822
7393
|
}
|
|
6823
7394
|
//#endregion
|
|
7395
|
+
//#region src/components/Text/Text.tsx
|
|
7396
|
+
/**
|
|
7397
|
+
* Text set in one of the design system's font scales and text colours.
|
|
7398
|
+
*/
|
|
7399
|
+
function Text({ is = "div", fontScale, color, truncate, className, ...props }) {
|
|
7400
|
+
return (0, react.createElement)(is, {
|
|
7401
|
+
className: cx(cxx("rcx-text")(fontScale && `font-scale-${fontScale}`, color && `color-${color}`, truncate && "truncate"), className),
|
|
7402
|
+
...props
|
|
7403
|
+
});
|
|
7404
|
+
}
|
|
7405
|
+
//#endregion
|
|
6824
7406
|
//#region src/components/TextAreaInput/TextAreaInput.tsx
|
|
6825
7407
|
/**
|
|
6826
7408
|
* An input for multi-line plain-text editing.
|
|
@@ -6848,9 +7430,9 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
6848
7430
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
6849
7431
|
is: "span",
|
|
6850
7432
|
className: _rocket_chat_css_in_js.css`
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
7433
|
+
animation-duration: ${circleCount * .466}s;
|
|
7434
|
+
animation-delay: ${iteration * .16}s;
|
|
7435
|
+
`,
|
|
6854
7436
|
"rcx-throbber__circle": true,
|
|
6855
7437
|
"rcx-throbber__circle--disabled": disabled,
|
|
6856
7438
|
"rcx-throbber__circle--inherit-color": inheritColor,
|
|
@@ -6874,6 +7456,16 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
6874
7456
|
});
|
|
6875
7457
|
}
|
|
6876
7458
|
//#endregion
|
|
7459
|
+
//#region src/components/Tile/Tile.tsx
|
|
7460
|
+
function Tile({ elevation = "1", flush, ...props }) {
|
|
7461
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box_default, {
|
|
7462
|
+
"rcx-tile": true,
|
|
7463
|
+
"rcx-tile--elevation": elevation,
|
|
7464
|
+
padding: flush ? void 0 : 16,
|
|
7465
|
+
...props
|
|
7466
|
+
});
|
|
7467
|
+
}
|
|
7468
|
+
//#endregion
|
|
6877
7469
|
//#region src/components/ToastBar/ToastBar.tsx
|
|
6878
7470
|
/**
|
|
6879
7471
|
* Shows alerts in a toast component.
|
|
@@ -6898,16 +7490,16 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
6898
7490
|
}
|
|
6899
7491
|
`;
|
|
6900
7492
|
const toastBarAnimation = _rocket_chat_css_in_js.css`
|
|
6901
|
-
|
|
6902
|
-
|
|
7493
|
+
animation: ${sideOpen} 0.5s;
|
|
7494
|
+
`;
|
|
6903
7495
|
const progressBarAnimation = _rocket_chat_css_in_js.css`
|
|
6904
|
-
|
|
6905
|
-
|
|
6906
|
-
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
|
|
6910
|
-
|
|
7496
|
+
&::after {
|
|
7497
|
+
width: 0%;
|
|
7498
|
+
animation: ${progressBar} ${time}s;
|
|
7499
|
+
animation-fill-mode: forwards;
|
|
7500
|
+
animation-play-state: ${isPaused ? "paused" : "running"};
|
|
7501
|
+
}
|
|
7502
|
+
`;
|
|
6911
7503
|
const uniqueId = (0, react.useId)();
|
|
6912
7504
|
const toastId = id || uniqueId;
|
|
6913
7505
|
const role = variant === "error" ? "alert" : "status";
|
|
@@ -6932,7 +7524,7 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
6932
7524
|
onClose && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6933
7525
|
className: "rcx-toastbar-close",
|
|
6934
7526
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconButton, {
|
|
6935
|
-
|
|
7527
|
+
size: "tiny",
|
|
6936
7528
|
"aria-label": buttonLabel,
|
|
6937
7529
|
onClick: () => onClose(toastId),
|
|
6938
7530
|
icon: "cross"
|
|
@@ -7014,6 +7606,7 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
7014
7606
|
exports.CardCol = CardCol;
|
|
7015
7607
|
exports.CardControls = CardControls;
|
|
7016
7608
|
exports.CardGrid = CardGrid;
|
|
7609
|
+
exports.CardGridItem = CardGridItem;
|
|
7017
7610
|
exports.CardGroup = CardGroup;
|
|
7018
7611
|
exports.CardHeader = CardHeader;
|
|
7019
7612
|
exports.CardRow = CardRow;
|
|
@@ -7057,7 +7650,24 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
7057
7650
|
exports.Input = Input;
|
|
7058
7651
|
exports.InputBox = InputBox;
|
|
7059
7652
|
exports.InputBoxSkeleton = InputBoxSkeleton;
|
|
7653
|
+
exports.Item = Item;
|
|
7654
|
+
exports.ItemActions = ItemActions;
|
|
7655
|
+
exports.ItemContent = ItemContent;
|
|
7656
|
+
exports.ItemDescription = ItemDescription;
|
|
7657
|
+
exports.ItemDivider = ItemDivider;
|
|
7658
|
+
exports.ItemGroup = ItemGroup;
|
|
7659
|
+
exports.ItemGroupHeader = ItemGroupHeader;
|
|
7660
|
+
exports.ItemGroupTitle = ItemGroupTitle;
|
|
7661
|
+
exports.ItemIcon = ItemIcon;
|
|
7662
|
+
exports.ItemLink = ItemLink;
|
|
7663
|
+
exports.ItemMedia = ItemMedia;
|
|
7664
|
+
exports.ItemMeta = ItemMeta;
|
|
7665
|
+
exports.ItemRow = ItemRow;
|
|
7666
|
+
exports.ItemSkeleton = ItemSkeleton;
|
|
7667
|
+
exports.ItemTitle = ItemTitle;
|
|
7060
7668
|
exports.Label = Label;
|
|
7669
|
+
exports.Listbox = Listbox;
|
|
7670
|
+
exports.ListboxOption = ListboxOption_default;
|
|
7061
7671
|
exports.Margins = Margins;
|
|
7062
7672
|
exports.Menu = Menu;
|
|
7063
7673
|
exports.MenuItem = MenuItem;
|
|
@@ -7168,6 +7778,7 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
7168
7778
|
exports.PaletteStyleTag = PaletteStyleTag_default;
|
|
7169
7779
|
exports.PasswordInput = PasswordInput;
|
|
7170
7780
|
exports.Popover = Popover;
|
|
7781
|
+
exports.PopoverSurface = PopoverSurface;
|
|
7171
7782
|
exports.PositionAnimated = PositionAnimated;
|
|
7172
7783
|
exports.ProgressBar = ProgressBar;
|
|
7173
7784
|
exports.RadioButton = RadioButton;
|
|
@@ -7191,11 +7802,13 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
7191
7802
|
exports.SidebarGroupTitle = SidebarGroupTitle;
|
|
7192
7803
|
exports.SidebarItem = SidebarItem;
|
|
7193
7804
|
exports.SidebarItemAction = SidebarItemAction;
|
|
7805
|
+
exports.SidebarItemActions = SidebarItemActions;
|
|
7194
7806
|
exports.SidebarItemAvatarWrapper = SidebarItemAvatarWrapper;
|
|
7195
7807
|
exports.SidebarItemBadge = SidebarItemBadge;
|
|
7196
7808
|
exports.SidebarItemCol = SidebarItemCol;
|
|
7197
7809
|
exports.SidebarItemContent = SidebarItemContent;
|
|
7198
7810
|
exports.SidebarItemIcon = SidebarItemIcon;
|
|
7811
|
+
exports.SidebarItemLink = SidebarItemLink;
|
|
7199
7812
|
exports.SidebarItemMenu = SidebarItemMenu;
|
|
7200
7813
|
exports.SidebarItemRow = SidebarItemRow;
|
|
7201
7814
|
exports.SidebarItemStatusBullet = SidebarItemStatusBullet;
|
|
@@ -7219,6 +7832,7 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
7219
7832
|
exports.Slider = Slider;
|
|
7220
7833
|
exports.SplitButton = SplitButton;
|
|
7221
7834
|
exports.SplitButtonTrigger = SplitButtonTrigger;
|
|
7835
|
+
exports.Stack = Stack;
|
|
7222
7836
|
exports.States = States;
|
|
7223
7837
|
exports.StatesAction = StatesAction;
|
|
7224
7838
|
exports.StatesActions = StatesActions;
|
|
@@ -7244,6 +7858,7 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
7244
7858
|
exports.Tabs = Tabs;
|
|
7245
7859
|
exports.TabsItem = TabsItem;
|
|
7246
7860
|
exports.Tag = Tag;
|
|
7861
|
+
exports.Text = Text;
|
|
7247
7862
|
exports.TextAreaInput = TextAreaInput;
|
|
7248
7863
|
exports.TextInput = TextInput;
|
|
7249
7864
|
exports.ThreadMessage = ThreadMessage;
|
|
@@ -7271,11 +7886,14 @@ if (process.env.NODE_ENV !== "production") (function() {
|
|
|
7271
7886
|
exports.fontColor = fontColor;
|
|
7272
7887
|
exports.fontFamily = fontFamily;
|
|
7273
7888
|
exports.fontScale = fontScale;
|
|
7889
|
+
exports.inset = inset;
|
|
7274
7890
|
exports.size = size;
|
|
7275
7891
|
exports.spacing = spacing;
|
|
7892
|
+
exports.spacingScale = spacingScale;
|
|
7276
7893
|
exports.strokeColor = strokeColor;
|
|
7277
7894
|
exports.useCursor = useCursor;
|
|
7278
7895
|
exports.useOwnerDocument = useOwnerDocument;
|
|
7896
|
+
exports.useStyle = useStyle;
|
|
7279
7897
|
})();
|
|
7280
7898
|
|
|
7281
7899
|
//# sourceMappingURL=fuselage.development.js.map
|