@oxy.so/bloom 5.1.0 → 5.1.1
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/docs/adoption-matrix.mdx +9 -9
- package/docs/button.mdx +2 -0
- package/docs/card-form.mdx +2 -0
- package/docs/chat-composer.mdx +1 -1
- package/docs/earnings.mdx +2 -0
- package/docs/field.mdx +2 -0
- package/docs/label.mdx +2 -0
- package/docs/payment-method.mdx +2 -0
- package/docs/place-details.mdx +2 -2
- package/docs/proof-of-delivery.mdx +4 -0
- package/docs/select.mdx +2 -0
- package/lib/commonjs/button/Button.js +36 -3
- package/lib/commonjs/button/Button.js.map +1 -1
- package/lib/commonjs/button/GlyphButton.js +7 -3
- package/lib/commonjs/button/GlyphButton.js.map +1 -1
- package/lib/commonjs/card-form/shared.js +3 -2
- package/lib/commonjs/card-form/shared.js.map +1 -1
- package/lib/commonjs/chat-composer/AttachmentMenu.js +8 -227
- package/lib/commonjs/chat-composer/AttachmentMenu.js.map +1 -1
- package/lib/commonjs/chat-composer/AttachmentMenu.web.js +16 -0
- package/lib/commonjs/chat-composer/AttachmentMenu.web.js.map +1 -0
- package/lib/commonjs/chat-composer/ChatComposer.js +9 -388
- package/lib/commonjs/chat-composer/ChatComposer.js.map +1 -1
- package/lib/commonjs/chat-composer/ChatComposer.web.js +16 -0
- package/lib/commonjs/chat-composer/ChatComposer.web.js.map +1 -0
- package/lib/commonjs/chat-composer/ComposerAttachmentStrip.js +5 -200
- package/lib/commonjs/chat-composer/ComposerAttachmentStrip.js.map +1 -1
- package/lib/commonjs/chat-composer/ComposerAttachmentStrip.web.js +12 -0
- package/lib/commonjs/chat-composer/ComposerAttachmentStrip.web.js.map +1 -0
- package/lib/commonjs/chat-composer/ComposerBanner.js +5 -163
- package/lib/commonjs/chat-composer/ComposerBanner.js.map +1 -1
- package/lib/commonjs/chat-composer/ComposerBanner.web.js +12 -0
- package/lib/commonjs/chat-composer/ComposerBanner.web.js.map +1 -0
- package/lib/commonjs/chat-composer/EmojiPicker.js +6 -443
- package/lib/commonjs/chat-composer/EmojiPicker.js.map +1 -1
- package/lib/commonjs/chat-composer/EmojiPicker.web.js +14 -0
- package/lib/commonjs/chat-composer/EmojiPicker.web.js.map +1 -0
- package/lib/commonjs/chat-composer/MessageContextMenu.js +12 -102
- package/lib/commonjs/chat-composer/MessageContextMenu.js.map +1 -1
- package/lib/commonjs/chat-composer/MessageContextMenu.web.js +19 -0
- package/lib/commonjs/chat-composer/MessageContextMenu.web.js.map +1 -0
- package/lib/commonjs/chat-composer/ReactionPicker.js +6 -107
- package/lib/commonjs/chat-composer/ReactionPicker.js.map +1 -1
- package/lib/commonjs/chat-composer/ReactionPicker.web.js +14 -0
- package/lib/commonjs/chat-composer/ReactionPicker.web.js.map +1 -0
- package/lib/commonjs/chat-composer/SuggestionList.js +5 -222
- package/lib/commonjs/chat-composer/SuggestionList.js.map +1 -1
- package/lib/commonjs/chat-composer/SuggestionList.web.js +12 -0
- package/lib/commonjs/chat-composer/SuggestionList.web.js.map +1 -0
- package/lib/commonjs/chat-composer/VoiceRecorder.js +7 -263
- package/lib/commonjs/chat-composer/VoiceRecorder.js.map +1 -1
- package/lib/commonjs/chat-composer/VoiceRecorder.web.js +16 -0
- package/lib/commonjs/chat-composer/VoiceRecorder.web.js.map +1 -0
- package/lib/commonjs/chat-composer/create-attachment-menu.js +243 -0
- package/lib/commonjs/chat-composer/create-attachment-menu.js.map +1 -0
- package/lib/commonjs/chat-composer/create-chat-composer.js +400 -0
- package/lib/commonjs/chat-composer/create-chat-composer.js.map +1 -0
- package/lib/commonjs/chat-composer/create-composer-attachment-strip.js +212 -0
- package/lib/commonjs/chat-composer/create-composer-attachment-strip.js.map +1 -0
- package/lib/commonjs/chat-composer/create-composer-banner.js +176 -0
- package/lib/commonjs/chat-composer/create-composer-banner.js.map +1 -0
- package/lib/commonjs/chat-composer/create-emoji-picker.js +456 -0
- package/lib/commonjs/chat-composer/create-emoji-picker.js.map +1 -0
- package/lib/commonjs/chat-composer/create-message-context-menu.js +119 -0
- package/lib/commonjs/chat-composer/create-message-context-menu.js.map +1 -0
- package/lib/commonjs/chat-composer/create-reaction-picker.js +120 -0
- package/lib/commonjs/chat-composer/create-reaction-picker.js.map +1 -0
- package/lib/commonjs/chat-composer/create-suggestion-list.js +234 -0
- package/lib/commonjs/chat-composer/create-suggestion-list.js.map +1 -0
- package/lib/commonjs/chat-composer/create-voice-recorder.js +277 -0
- package/lib/commonjs/chat-composer/create-voice-recorder.js.map +1 -0
- package/lib/commonjs/chat-composer/index.js +9 -9
- package/lib/commonjs/chat-composer/index.web.js +18 -18
- package/lib/commonjs/chat-composer/index.web.js.map +1 -1
- package/lib/commonjs/earnings/EarningsSummary.js +12 -2
- package/lib/commonjs/earnings/EarningsSummary.js.map +1 -1
- package/lib/commonjs/field/Field.js +2 -0
- package/lib/commonjs/field/Field.js.map +1 -1
- package/lib/commonjs/item/Item.js +16 -8
- package/lib/commonjs/item/Item.js.map +1 -1
- package/lib/commonjs/job-board/JobCard.js +6 -2
- package/lib/commonjs/job-board/JobCard.js.map +1 -1
- package/lib/commonjs/label/Label.js +2 -1
- package/lib/commonjs/label/Label.js.map +1 -1
- package/lib/commonjs/listing-details/AmenityList.js +4 -3
- package/lib/commonjs/listing-details/AmenityList.js.map +1 -1
- package/lib/commonjs/mail-compose/MailComposeSurface.js +1 -1
- package/lib/commonjs/overlay/InteractionBoundary.js +28 -0
- package/lib/commonjs/overlay/InteractionBoundary.js.map +1 -0
- package/lib/commonjs/payment-method/PaymentMethodList.js +3 -2
- package/lib/commonjs/payment-method/PaymentMethodList.js.map +1 -1
- package/lib/commonjs/place-details/PlaceAmenities.js +17 -6
- package/lib/commonjs/place-details/PlaceAmenities.js.map +1 -1
- package/lib/commonjs/place-details/PlacePopularTimes.js +7 -1
- package/lib/commonjs/place-details/PlacePopularTimes.js.map +1 -1
- package/lib/commonjs/proof-of-delivery/ProofOfDelivery.js +10 -1
- package/lib/commonjs/proof-of-delivery/ProofOfDelivery.js.map +1 -1
- package/lib/commonjs/proof-of-delivery/shared.js +1 -1
- package/lib/commonjs/proof-of-delivery/shared.js.map +1 -1
- package/lib/commonjs/select/Select.js +7 -4
- package/lib/commonjs/select/Select.js.map +1 -1
- package/lib/commonjs/select/Select.web.js +7 -4
- package/lib/commonjs/select/Select.web.js.map +1 -1
- package/lib/commonjs/select/use-required-description.js +37 -0
- package/lib/commonjs/select/use-required-description.js.map +1 -0
- package/lib/module/button/Button.js +36 -3
- package/lib/module/button/Button.js.map +1 -1
- package/lib/module/button/GlyphButton.js +7 -3
- package/lib/module/button/GlyphButton.js.map +1 -1
- package/lib/module/card-form/shared.js +3 -2
- package/lib/module/card-form/shared.js.map +1 -1
- package/lib/module/chat-composer/AttachmentMenu.js +7 -226
- package/lib/module/chat-composer/AttachmentMenu.js.map +1 -1
- package/lib/module/chat-composer/AttachmentMenu.web.js +12 -0
- package/lib/module/chat-composer/AttachmentMenu.web.js.map +1 -0
- package/lib/module/chat-composer/ChatComposer.js +8 -385
- package/lib/module/chat-composer/ChatComposer.js.map +1 -1
- package/lib/module/chat-composer/ChatComposer.web.js +12 -0
- package/lib/module/chat-composer/ChatComposer.web.js.map +1 -0
- package/lib/module/chat-composer/ComposerAttachmentStrip.js +4 -196
- package/lib/module/chat-composer/ComposerAttachmentStrip.js.map +1 -1
- package/lib/module/chat-composer/ComposerAttachmentStrip.web.js +8 -0
- package/lib/module/chat-composer/ComposerAttachmentStrip.web.js.map +1 -0
- package/lib/module/chat-composer/ComposerBanner.js +4 -162
- package/lib/module/chat-composer/ComposerBanner.js.map +1 -1
- package/lib/module/chat-composer/ComposerBanner.web.js +8 -0
- package/lib/module/chat-composer/ComposerBanner.web.js.map +1 -0
- package/lib/module/chat-composer/EmojiPicker.js +5 -440
- package/lib/module/chat-composer/EmojiPicker.js.map +1 -1
- package/lib/module/chat-composer/EmojiPicker.web.js +10 -0
- package/lib/module/chat-composer/EmojiPicker.web.js.map +1 -0
- package/lib/module/chat-composer/MessageContextMenu.js +11 -99
- package/lib/module/chat-composer/MessageContextMenu.js.map +1 -1
- package/lib/module/chat-composer/MessageContextMenu.web.js +15 -0
- package/lib/module/chat-composer/MessageContextMenu.web.js.map +1 -0
- package/lib/module/chat-composer/ReactionPicker.js +5 -104
- package/lib/module/chat-composer/ReactionPicker.js.map +1 -1
- package/lib/module/chat-composer/ReactionPicker.web.js +10 -0
- package/lib/module/chat-composer/ReactionPicker.web.js.map +1 -0
- package/lib/module/chat-composer/SuggestionList.js +4 -219
- package/lib/module/chat-composer/SuggestionList.js.map +1 -1
- package/lib/module/chat-composer/SuggestionList.web.js +8 -0
- package/lib/module/chat-composer/SuggestionList.web.js.map +1 -0
- package/lib/module/chat-composer/VoiceRecorder.js +6 -260
- package/lib/module/chat-composer/VoiceRecorder.js.map +1 -1
- package/lib/module/chat-composer/VoiceRecorder.web.js +12 -0
- package/lib/module/chat-composer/VoiceRecorder.web.js.map +1 -0
- package/lib/module/chat-composer/create-attachment-menu.js +238 -0
- package/lib/module/chat-composer/create-attachment-menu.js.map +1 -0
- package/lib/module/chat-composer/create-chat-composer.js +395 -0
- package/lib/module/chat-composer/create-chat-composer.js.map +1 -0
- package/lib/module/chat-composer/create-composer-attachment-strip.js +206 -0
- package/lib/module/chat-composer/create-composer-attachment-strip.js.map +1 -0
- package/lib/module/chat-composer/create-composer-banner.js +171 -0
- package/lib/module/chat-composer/create-composer-banner.js.map +1 -0
- package/lib/module/chat-composer/create-emoji-picker.js +451 -0
- package/lib/module/chat-composer/create-emoji-picker.js.map +1 -0
- package/lib/module/chat-composer/create-message-context-menu.js +114 -0
- package/lib/module/chat-composer/create-message-context-menu.js.map +1 -0
- package/lib/module/chat-composer/create-reaction-picker.js +115 -0
- package/lib/module/chat-composer/create-reaction-picker.js.map +1 -0
- package/lib/module/chat-composer/create-suggestion-list.js +229 -0
- package/lib/module/chat-composer/create-suggestion-list.js.map +1 -0
- package/lib/module/chat-composer/create-voice-recorder.js +272 -0
- package/lib/module/chat-composer/create-voice-recorder.js.map +1 -0
- package/lib/module/chat-composer/index.js +9 -9
- package/lib/module/chat-composer/index.js.map +1 -1
- package/lib/module/chat-composer/index.web.js +9 -9
- package/lib/module/chat-composer/index.web.js.map +1 -1
- package/lib/module/earnings/EarningsSummary.js +12 -2
- package/lib/module/earnings/EarningsSummary.js.map +1 -1
- package/lib/module/field/Field.js +2 -0
- package/lib/module/field/Field.js.map +1 -1
- package/lib/module/item/Item.js +16 -8
- package/lib/module/item/Item.js.map +1 -1
- package/lib/module/job-board/JobCard.js +6 -2
- package/lib/module/job-board/JobCard.js.map +1 -1
- package/lib/module/label/Label.js +2 -1
- package/lib/module/label/Label.js.map +1 -1
- package/lib/module/listing-details/AmenityList.js +4 -3
- package/lib/module/listing-details/AmenityList.js.map +1 -1
- package/lib/module/mail-compose/MailComposeSurface.js +1 -1
- package/lib/module/mail-compose/MailComposeSurface.js.map +1 -1
- package/lib/module/overlay/InteractionBoundary.js +25 -0
- package/lib/module/overlay/InteractionBoundary.js.map +1 -0
- package/lib/module/payment-method/PaymentMethodList.js +3 -2
- package/lib/module/payment-method/PaymentMethodList.js.map +1 -1
- package/lib/module/place-details/PlaceAmenities.js +15 -4
- package/lib/module/place-details/PlaceAmenities.js.map +1 -1
- package/lib/module/place-details/PlacePopularTimes.js +7 -1
- package/lib/module/place-details/PlacePopularTimes.js.map +1 -1
- package/lib/module/proof-of-delivery/ProofOfDelivery.js +10 -1
- package/lib/module/proof-of-delivery/ProofOfDelivery.js.map +1 -1
- package/lib/module/proof-of-delivery/shared.js +1 -1
- package/lib/module/proof-of-delivery/shared.js.map +1 -1
- package/lib/module/select/Select.js +7 -4
- package/lib/module/select/Select.js.map +1 -1
- package/lib/module/select/Select.web.js +7 -4
- package/lib/module/select/Select.web.js.map +1 -1
- package/lib/module/select/use-required-description.js +33 -0
- package/lib/module/select/use-required-description.js.map +1 -0
- package/lib/typescript/commonjs/button/Button.d.ts.map +1 -1
- package/lib/typescript/commonjs/card-form/shared.d.ts +2 -1
- package/lib/typescript/commonjs/card-form/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/AttachmentMenu.d.ts +1 -2
- package/lib/typescript/commonjs/chat-composer/AttachmentMenu.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/AttachmentMenu.web.d.ts +2 -0
- package/lib/typescript/commonjs/chat-composer/AttachmentMenu.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/ChatComposer.d.ts +1 -2
- package/lib/typescript/commonjs/chat-composer/ChatComposer.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/ChatComposer.web.d.ts +2 -0
- package/lib/typescript/commonjs/chat-composer/ChatComposer.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/ComposerAttachmentStrip.d.ts +1 -2
- package/lib/typescript/commonjs/chat-composer/ComposerAttachmentStrip.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/ComposerAttachmentStrip.web.d.ts +2 -0
- package/lib/typescript/commonjs/chat-composer/ComposerAttachmentStrip.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/ComposerBanner.d.ts +1 -2
- package/lib/typescript/commonjs/chat-composer/ComposerBanner.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/ComposerBanner.web.d.ts +2 -0
- package/lib/typescript/commonjs/chat-composer/ComposerBanner.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/EmojiPicker.d.ts +1 -2
- package/lib/typescript/commonjs/chat-composer/EmojiPicker.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/EmojiPicker.web.d.ts +2 -0
- package/lib/typescript/commonjs/chat-composer/EmojiPicker.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/MessageContextMenu.d.ts +1 -2
- package/lib/typescript/commonjs/chat-composer/MessageContextMenu.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/MessageContextMenu.web.d.ts +2 -0
- package/lib/typescript/commonjs/chat-composer/MessageContextMenu.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/ReactionPicker.d.ts +1 -2
- package/lib/typescript/commonjs/chat-composer/ReactionPicker.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/ReactionPicker.web.d.ts +2 -0
- package/lib/typescript/commonjs/chat-composer/ReactionPicker.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/SuggestionList.d.ts +1 -2
- package/lib/typescript/commonjs/chat-composer/SuggestionList.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/SuggestionList.web.d.ts +2 -0
- package/lib/typescript/commonjs/chat-composer/SuggestionList.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/VoiceRecorder.d.ts +1 -2
- package/lib/typescript/commonjs/chat-composer/VoiceRecorder.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/VoiceRecorder.web.d.ts +2 -0
- package/lib/typescript/commonjs/chat-composer/VoiceRecorder.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/create-attachment-menu.d.ts +11 -0
- package/lib/typescript/commonjs/chat-composer/create-attachment-menu.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/create-chat-composer.d.ts +11 -0
- package/lib/typescript/commonjs/chat-composer/create-chat-composer.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/create-composer-attachment-strip.d.ts +7 -0
- package/lib/typescript/commonjs/chat-composer/create-composer-attachment-strip.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/create-composer-banner.d.ts +7 -0
- package/lib/typescript/commonjs/chat-composer/create-composer-banner.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/create-emoji-picker.d.ts +9 -0
- package/lib/typescript/commonjs/chat-composer/create-emoji-picker.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/create-message-context-menu.d.ts +14 -0
- package/lib/typescript/commonjs/chat-composer/create-message-context-menu.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/create-reaction-picker.d.ts +9 -0
- package/lib/typescript/commonjs/chat-composer/create-reaction-picker.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/create-suggestion-list.d.ts +7 -0
- package/lib/typescript/commonjs/chat-composer/create-suggestion-list.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/create-voice-recorder.d.ts +11 -0
- package/lib/typescript/commonjs/chat-composer/create-voice-recorder.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/index.web.d.ts +9 -9
- package/lib/typescript/commonjs/chat-composer/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/earnings/EarningsSummary.d.ts.map +1 -1
- package/lib/typescript/commonjs/field/Field.d.ts +1 -1
- package/lib/typescript/commonjs/field/Field.d.ts.map +1 -1
- package/lib/typescript/commonjs/field/types.d.ts +2 -0
- package/lib/typescript/commonjs/field/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/floating/types.d.ts +1 -0
- package/lib/typescript/commonjs/floating/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/item/Item.d.ts.map +1 -1
- package/lib/typescript/commonjs/job-board/JobCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/label/Label.d.ts +1 -1
- package/lib/typescript/commonjs/label/Label.d.ts.map +1 -1
- package/lib/typescript/commonjs/label/types.d.ts +2 -0
- package/lib/typescript/commonjs/label/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/listing-details/AmenityList.d.ts.map +1 -1
- package/lib/typescript/commonjs/overlay/InteractionBoundary.d.ts +7 -0
- package/lib/typescript/commonjs/overlay/InteractionBoundary.d.ts.map +1 -0
- package/lib/typescript/commonjs/payment-method/PaymentMethodList.d.ts.map +1 -1
- package/lib/typescript/commonjs/place-details/PlaceAmenities.d.ts.map +1 -1
- package/lib/typescript/commonjs/place-details/PlacePopularTimes.d.ts.map +1 -1
- package/lib/typescript/commonjs/proof-of-delivery/ProofOfDelivery.d.ts.map +1 -1
- package/lib/typescript/commonjs/select/Select.d.ts.map +1 -1
- package/lib/typescript/commonjs/select/Select.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/select/use-required-description.d.ts +7 -0
- package/lib/typescript/commonjs/select/use-required-description.d.ts.map +1 -0
- package/lib/typescript/module/button/Button.d.ts.map +1 -1
- package/lib/typescript/module/card-form/shared.d.ts +2 -1
- package/lib/typescript/module/card-form/shared.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/AttachmentMenu.d.ts +1 -2
- package/lib/typescript/module/chat-composer/AttachmentMenu.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/AttachmentMenu.web.d.ts +2 -0
- package/lib/typescript/module/chat-composer/AttachmentMenu.web.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/ChatComposer.d.ts +1 -2
- package/lib/typescript/module/chat-composer/ChatComposer.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/ChatComposer.web.d.ts +2 -0
- package/lib/typescript/module/chat-composer/ChatComposer.web.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/ComposerAttachmentStrip.d.ts +1 -2
- package/lib/typescript/module/chat-composer/ComposerAttachmentStrip.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/ComposerAttachmentStrip.web.d.ts +2 -0
- package/lib/typescript/module/chat-composer/ComposerAttachmentStrip.web.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/ComposerBanner.d.ts +1 -2
- package/lib/typescript/module/chat-composer/ComposerBanner.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/ComposerBanner.web.d.ts +2 -0
- package/lib/typescript/module/chat-composer/ComposerBanner.web.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/EmojiPicker.d.ts +1 -2
- package/lib/typescript/module/chat-composer/EmojiPicker.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/EmojiPicker.web.d.ts +2 -0
- package/lib/typescript/module/chat-composer/EmojiPicker.web.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/MessageContextMenu.d.ts +1 -2
- package/lib/typescript/module/chat-composer/MessageContextMenu.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/MessageContextMenu.web.d.ts +2 -0
- package/lib/typescript/module/chat-composer/MessageContextMenu.web.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/ReactionPicker.d.ts +1 -2
- package/lib/typescript/module/chat-composer/ReactionPicker.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/ReactionPicker.web.d.ts +2 -0
- package/lib/typescript/module/chat-composer/ReactionPicker.web.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/SuggestionList.d.ts +1 -2
- package/lib/typescript/module/chat-composer/SuggestionList.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/SuggestionList.web.d.ts +2 -0
- package/lib/typescript/module/chat-composer/SuggestionList.web.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/VoiceRecorder.d.ts +1 -2
- package/lib/typescript/module/chat-composer/VoiceRecorder.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/VoiceRecorder.web.d.ts +2 -0
- package/lib/typescript/module/chat-composer/VoiceRecorder.web.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/create-attachment-menu.d.ts +11 -0
- package/lib/typescript/module/chat-composer/create-attachment-menu.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/create-chat-composer.d.ts +11 -0
- package/lib/typescript/module/chat-composer/create-chat-composer.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/create-composer-attachment-strip.d.ts +7 -0
- package/lib/typescript/module/chat-composer/create-composer-attachment-strip.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/create-composer-banner.d.ts +7 -0
- package/lib/typescript/module/chat-composer/create-composer-banner.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/create-emoji-picker.d.ts +9 -0
- package/lib/typescript/module/chat-composer/create-emoji-picker.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/create-message-context-menu.d.ts +14 -0
- package/lib/typescript/module/chat-composer/create-message-context-menu.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/create-reaction-picker.d.ts +9 -0
- package/lib/typescript/module/chat-composer/create-reaction-picker.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/create-suggestion-list.d.ts +7 -0
- package/lib/typescript/module/chat-composer/create-suggestion-list.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/create-voice-recorder.d.ts +11 -0
- package/lib/typescript/module/chat-composer/create-voice-recorder.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/index.web.d.ts +9 -9
- package/lib/typescript/module/chat-composer/index.web.d.ts.map +1 -1
- package/lib/typescript/module/earnings/EarningsSummary.d.ts.map +1 -1
- package/lib/typescript/module/field/Field.d.ts +1 -1
- package/lib/typescript/module/field/Field.d.ts.map +1 -1
- package/lib/typescript/module/field/types.d.ts +2 -0
- package/lib/typescript/module/field/types.d.ts.map +1 -1
- package/lib/typescript/module/floating/types.d.ts +1 -0
- package/lib/typescript/module/floating/types.d.ts.map +1 -1
- package/lib/typescript/module/item/Item.d.ts.map +1 -1
- package/lib/typescript/module/job-board/JobCard.d.ts.map +1 -1
- package/lib/typescript/module/label/Label.d.ts +1 -1
- package/lib/typescript/module/label/Label.d.ts.map +1 -1
- package/lib/typescript/module/label/types.d.ts +2 -0
- package/lib/typescript/module/label/types.d.ts.map +1 -1
- package/lib/typescript/module/listing-details/AmenityList.d.ts.map +1 -1
- package/lib/typescript/module/overlay/InteractionBoundary.d.ts +7 -0
- package/lib/typescript/module/overlay/InteractionBoundary.d.ts.map +1 -0
- package/lib/typescript/module/payment-method/PaymentMethodList.d.ts.map +1 -1
- package/lib/typescript/module/place-details/PlaceAmenities.d.ts.map +1 -1
- package/lib/typescript/module/place-details/PlacePopularTimes.d.ts.map +1 -1
- package/lib/typescript/module/proof-of-delivery/ProofOfDelivery.d.ts.map +1 -1
- package/lib/typescript/module/select/Select.d.ts.map +1 -1
- package/lib/typescript/module/select/Select.web.d.ts.map +1 -1
- package/lib/typescript/module/select/use-required-description.d.ts +7 -0
- package/lib/typescript/module/select/use-required-description.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/__tests__/support/adoption-matrix.ts +708 -0
- package/src/__tests__/support/card-surface.ts +17 -0
- package/src/__tests__/support/collision-fixture-barrel.ts +20 -0
- package/src/__tests__/support/commerce-harness.tsx +97 -0
- package/src/__tests__/support/composite.ts +68 -0
- package/src/__tests__/support/constructed-style-sheets.ts +68 -0
- package/src/__tests__/support/press-host.ts +30 -0
- package/src/__tests__/support/rendered-style.ts +99 -0
- package/src/__tests__/support/unread-hook-fixture.ts +33 -0
- package/src/__tests__/support/worklet-capture-fixture.tsx +28 -0
- package/src/button/Button.tsx +35 -10
- package/src/button/GlyphButton.tsx +3 -3
- package/src/card-form/shared.ts +3 -2
- package/src/chat-composer/AttachmentMenu.tsx +2 -214
- package/src/chat-composer/AttachmentMenu.web.tsx +5 -0
- package/src/chat-composer/ChatComposer.tsx +2 -459
- package/src/chat-composer/ChatComposer.web.tsx +6 -0
- package/src/chat-composer/ComposerAttachmentStrip.tsx +2 -202
- package/src/chat-composer/ComposerAttachmentStrip.web.tsx +4 -0
- package/src/chat-composer/ComposerBanner.tsx +2 -157
- package/src/chat-composer/ComposerBanner.web.tsx +4 -0
- package/src/chat-composer/EmojiPicker.tsx +2 -402
- package/src/chat-composer/EmojiPicker.web.tsx +5 -0
- package/src/chat-composer/MessageContextMenu.tsx +2 -88
- package/src/chat-composer/MessageContextMenu.web.tsx +12 -0
- package/src/chat-composer/ReactionPicker.tsx +2 -100
- package/src/chat-composer/ReactionPicker.web.tsx +5 -0
- package/src/chat-composer/SuggestionList.tsx +2 -209
- package/src/chat-composer/SuggestionList.web.tsx +4 -0
- package/src/chat-composer/VoiceRecorder.tsx +2 -287
- package/src/chat-composer/VoiceRecorder.web.tsx +6 -0
- package/src/chat-composer/create-attachment-menu.tsx +228 -0
- package/src/chat-composer/create-chat-composer.tsx +473 -0
- package/src/chat-composer/create-composer-attachment-strip.tsx +212 -0
- package/src/chat-composer/create-composer-banner.tsx +167 -0
- package/src/chat-composer/create-emoji-picker.tsx +414 -0
- package/src/chat-composer/create-message-context-menu.tsx +112 -0
- package/src/chat-composer/create-reaction-picker.tsx +112 -0
- package/src/chat-composer/create-suggestion-list.tsx +219 -0
- package/src/chat-composer/create-voice-recorder.tsx +301 -0
- package/src/chat-composer/index.web.ts +9 -9
- package/src/earnings/EarningsSummary.tsx +9 -2
- package/src/field/Field.tsx +2 -1
- package/src/field/types.ts +2 -0
- package/src/floating/types.ts +1 -0
- package/src/item/Item.tsx +16 -11
- package/src/job-board/JobCard.tsx +4 -1
- package/src/label/Label.tsx +2 -1
- package/src/label/types.ts +2 -0
- package/src/listing-details/AmenityList.tsx +4 -3
- package/src/overlay/InteractionBoundary.tsx +24 -0
- package/src/payment-method/PaymentMethodList.tsx +2 -1
- package/src/place-details/PlaceAmenities.tsx +9 -0
- package/src/place-details/PlacePopularTimes.tsx +7 -1
- package/src/proof-of-delivery/ProofOfDelivery.tsx +9 -1
- package/src/proof-of-delivery/shared.ts +1 -1
- package/src/select/Select.tsx +5 -1
- package/src/select/Select.web.tsx +5 -1
- package/src/select/use-required-description.tsx +20 -0
- package/src/theme/__tests__/__fixtures__/golden-resolved-tokens.json +9346 -0
- package/src/theme/__tests__/__fixtures__/tonal-glass-primary-failures.json +69 -0
- package/src/theme/__tests__/fixtures/color-engine-golden.json +1 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { ComposerIconButton } from "./ComposerIconButton.web.js";
|
|
4
|
+
import { createComposerAttachmentStrip } from "./create-composer-attachment-strip.js";
|
|
5
|
+
export const ComposerAttachmentStrip = createComposerAttachmentStrip({
|
|
6
|
+
ComposerIconButton
|
|
7
|
+
});
|
|
8
|
+
//# sourceMappingURL=ComposerAttachmentStrip.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ComposerIconButton","createComposerAttachmentStrip","ComposerAttachmentStrip"],"sourceRoot":"../../../src","sources":["chat-composer/ComposerAttachmentStrip.web.tsx"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,6BAA0B;AAC7D,SAASC,6BAA6B,QAAQ,uCAAoC;AAElF,OAAO,MAAMC,uBAAuB,GAAGD,6BAA6B,CAAC;EAAED;AAAmB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,166 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* The stack above the input: a reply / edit / forward preview, or the one-line
|
|
5
|
-
* `note` a slow-mode countdown and a scheduled send use.
|
|
6
|
-
*
|
|
7
|
-
* Every banner is the same row — rail, glyph, optional thumbnail, two lines of
|
|
8
|
-
* text, a close button — because they are the same affordance ("the next
|
|
9
|
-
* message is about THIS, and here is how to get out of it"). `note` drops the
|
|
10
|
-
* rail and the surface, which is the difference between "you are in a mode" and
|
|
11
|
-
* "here is a fact about sending".
|
|
12
|
-
*/
|
|
13
|
-
import React from 'react';
|
|
14
|
-
import { Image, View } from 'react-native';
|
|
15
|
-
import { RiCloseLine } from "../icons/remix/RiCloseLine.js";
|
|
16
|
-
import { useImageResolver } from "../image-resolver/context.js";
|
|
17
|
-
import { useTheme } from "../theme/use-theme.js";
|
|
18
|
-
import { Text } from "../typography/index.js";
|
|
19
3
|
import { ComposerIconButton } from './ComposerIconButton';
|
|
20
|
-
import {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
|
-
function isUrl(value) {
|
|
26
|
-
return /^(https?:)?\/\//.test(value) || value.startsWith('data:') || value.startsWith('file:');
|
|
27
|
-
}
|
|
28
|
-
export function ComposerBanner({
|
|
29
|
-
kind,
|
|
30
|
-
title,
|
|
31
|
-
preview,
|
|
32
|
-
thumbnail,
|
|
33
|
-
icon,
|
|
34
|
-
accentColor,
|
|
35
|
-
onClose,
|
|
36
|
-
closeLabel: closeLabelProp,
|
|
37
|
-
trailing,
|
|
38
|
-
style,
|
|
39
|
-
testID,
|
|
40
|
-
accessibilityLabel
|
|
41
|
-
}) {
|
|
42
|
-
const common = useCommonMessages();
|
|
43
|
-
const closeLabel = closeLabelProp ?? common.cancel;
|
|
44
|
-
const theme = useTheme();
|
|
45
|
-
const palette = resolveChatComposerPalette(theme);
|
|
46
|
-
const resolveImage = useImageResolver();
|
|
47
|
-
const Icon = icon ?? BANNER_ICONS[kind];
|
|
48
|
-
const accent = accentColor ?? palette.accent;
|
|
49
|
-
const note = kind === 'note';
|
|
50
|
-
const thumbUri = thumbnail === undefined ? undefined : isUrl(thumbnail) ? thumbnail : resolveImage?.(thumbnail, 'thumb');
|
|
51
|
-
if (note) {
|
|
52
|
-
return /*#__PURE__*/_jsxs(View, {
|
|
53
|
-
accessibilityRole: "text",
|
|
54
|
-
accessibilityLabel: accessibilityLabel ?? (preview ? `${title}. ${preview}` : title),
|
|
55
|
-
style: [{
|
|
56
|
-
flexDirection: 'row',
|
|
57
|
-
alignItems: 'center',
|
|
58
|
-
gap: 6,
|
|
59
|
-
paddingLeft: 10,
|
|
60
|
-
paddingRight: 6,
|
|
61
|
-
paddingTop: 2,
|
|
62
|
-
paddingBottom: 2
|
|
63
|
-
}, style],
|
|
64
|
-
testID: testID,
|
|
65
|
-
children: [/*#__PURE__*/_jsx(Icon, {
|
|
66
|
-
width: 14,
|
|
67
|
-
height: 14,
|
|
68
|
-
fill: palette.iconSecondary
|
|
69
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
70
|
-
variant: "caption-1-regular",
|
|
71
|
-
numberOfLines: 1,
|
|
72
|
-
style: {
|
|
73
|
-
color: palette.textSecondary,
|
|
74
|
-
flexShrink: 1
|
|
75
|
-
},
|
|
76
|
-
children: title
|
|
77
|
-
}), preview ? /*#__PURE__*/_jsx(Text, {
|
|
78
|
-
variant: "caption-1-regular",
|
|
79
|
-
numberOfLines: 1,
|
|
80
|
-
style: {
|
|
81
|
-
color: palette.textPlaceholder,
|
|
82
|
-
flexShrink: 1
|
|
83
|
-
},
|
|
84
|
-
children: preview
|
|
85
|
-
}) : null, /*#__PURE__*/_jsx(View, {
|
|
86
|
-
style: {
|
|
87
|
-
flexGrow: 1
|
|
88
|
-
}
|
|
89
|
-
}), trailing, onClose ? /*#__PURE__*/_jsx(ComposerIconButton, {
|
|
90
|
-
icon: RiCloseLine,
|
|
91
|
-
accessibilityLabel: closeLabel,
|
|
92
|
-
onPress: onClose,
|
|
93
|
-
size: 24,
|
|
94
|
-
iconSize: 14
|
|
95
|
-
}) : null]
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
return /*#__PURE__*/_jsxs(View, {
|
|
99
|
-
accessibilityLabel: accessibilityLabel ?? (preview ? `${title}. ${preview}` : title),
|
|
100
|
-
style: [{
|
|
101
|
-
flexDirection: 'row',
|
|
102
|
-
alignItems: 'center',
|
|
103
|
-
gap: 10,
|
|
104
|
-
borderRadius: BANNER_RADIUS,
|
|
105
|
-
backgroundColor: palette.accentSoft,
|
|
106
|
-
paddingLeft: 8,
|
|
107
|
-
paddingRight: 4,
|
|
108
|
-
paddingTop: 6,
|
|
109
|
-
paddingBottom: 6
|
|
110
|
-
}, style],
|
|
111
|
-
testID: testID,
|
|
112
|
-
children: [/*#__PURE__*/_jsx(View, {
|
|
113
|
-
testID: testID ? `${testID}-rail` : undefined,
|
|
114
|
-
style: {
|
|
115
|
-
width: BANNER_RAIL_WIDTH,
|
|
116
|
-
alignSelf: 'stretch',
|
|
117
|
-
minHeight: 32,
|
|
118
|
-
borderRadius: 2,
|
|
119
|
-
backgroundColor: accent
|
|
120
|
-
}
|
|
121
|
-
}), /*#__PURE__*/_jsx(Icon, {
|
|
122
|
-
width: 18,
|
|
123
|
-
height: 18,
|
|
124
|
-
fill: accent
|
|
125
|
-
}), thumbUri ? /*#__PURE__*/_jsx(Image, {
|
|
126
|
-
source: {
|
|
127
|
-
uri: thumbUri
|
|
128
|
-
},
|
|
129
|
-
accessibilityIgnoresInvertColors: true,
|
|
130
|
-
style: {
|
|
131
|
-
width: 32,
|
|
132
|
-
height: 32,
|
|
133
|
-
borderRadius: 8,
|
|
134
|
-
backgroundColor: palette.inset
|
|
135
|
-
}
|
|
136
|
-
}) : null, /*#__PURE__*/_jsxs(View, {
|
|
137
|
-
style: {
|
|
138
|
-
flexShrink: 1,
|
|
139
|
-
flexGrow: 1,
|
|
140
|
-
gap: 1
|
|
141
|
-
},
|
|
142
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
143
|
-
variant: "body-2-medium",
|
|
144
|
-
numberOfLines: 1,
|
|
145
|
-
style: {
|
|
146
|
-
color: accent
|
|
147
|
-
},
|
|
148
|
-
children: title
|
|
149
|
-
}), preview ? /*#__PURE__*/_jsx(Text, {
|
|
150
|
-
variant: "body-2-regular",
|
|
151
|
-
numberOfLines: 1,
|
|
152
|
-
style: {
|
|
153
|
-
color: palette.textSecondary
|
|
154
|
-
},
|
|
155
|
-
children: preview
|
|
156
|
-
}) : null]
|
|
157
|
-
}), trailing, onClose ? /*#__PURE__*/_jsx(ComposerIconButton, {
|
|
158
|
-
icon: RiCloseLine,
|
|
159
|
-
accessibilityLabel: closeLabel,
|
|
160
|
-
onPress: onClose,
|
|
161
|
-
size: 28,
|
|
162
|
-
iconSize: 16
|
|
163
|
-
}) : null]
|
|
164
|
-
});
|
|
165
|
-
}
|
|
4
|
+
import { createComposerBanner } from "./create-composer-banner.js";
|
|
5
|
+
export const ComposerBanner = createComposerBanner({
|
|
6
|
+
ComposerIconButton
|
|
7
|
+
});
|
|
166
8
|
//# sourceMappingURL=ComposerBanner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["ComposerIconButton","createComposerBanner","ComposerBanner"],"sourceRoot":"../../../src","sources":["chat-composer/ComposerBanner.tsx"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,sBAAsB;AACzD,SAASC,oBAAoB,QAAQ,6BAA0B;AAE/D,OAAO,MAAMC,cAAc,GAAGD,oBAAoB,CAAC;EAAED;AAAmB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { ComposerIconButton } from "./ComposerIconButton.web.js";
|
|
4
|
+
import { createComposerBanner } from "./create-composer-banner.js";
|
|
5
|
+
export const ComposerBanner = createComposerBanner({
|
|
6
|
+
ComposerIconButton
|
|
7
|
+
});
|
|
8
|
+
//# sourceMappingURL=ComposerBanner.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ComposerIconButton","createComposerBanner","ComposerBanner"],"sourceRoot":"../../../src","sources":["chat-composer/ComposerBanner.web.tsx"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,6BAA0B;AAC7D,SAASC,oBAAoB,QAAQ,6BAA0B;AAE/D,OAAO,MAAMC,cAAc,GAAGD,oBAAoB,CAAC;EAAED;AAAmB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,445 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { useCardFill } from "../card/use-card-fill.js";
|
|
4
3
|
import { Surface } from '../surface';
|
|
5
|
-
/**
|
|
6
|
-
* A controlled, presentational emoji grid.
|
|
7
|
-
*
|
|
8
|
-
* BLOOM SHIPS NO EMOJI DATASET, and that is the design rather than an omission:
|
|
9
|
-
* a full set with names and keywords is tens of kilobytes that every app with
|
|
10
|
-
* its own would still pay for, and emoji names are localised. `groups` arrives
|
|
11
|
-
* as a prop. The object form of an entry (`{ char, name, keywords }`) is what
|
|
12
|
-
* the built-in search matches on; a dataset of bare glyphs still renders, it
|
|
13
|
-
* just only matches a pasted glyph — which is the honest behaviour, not a
|
|
14
|
-
* silent one.
|
|
15
|
-
*
|
|
16
|
-
* The grid is a `FlatList` on BOTH platforms, over pre-chunked ROWS rather than
|
|
17
|
-
* single emoji, with exact `getItemLayout` offsets. A few thousand entries is
|
|
18
|
-
* the normal case: at eight columns that is a few hundred rows, of which a
|
|
19
|
-
* dozen are mounted, and the exact offsets are what let a category tab jump
|
|
20
|
-
* straight to its header instead of estimating.
|
|
21
|
-
*/
|
|
22
|
-
import React, { useCallback, useMemo, useRef, useState } from 'react';
|
|
23
4
|
import { Button } from '../button';
|
|
24
|
-
import {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
import { Text } from "../typography/index.js";
|
|
30
|
-
import { TYPE_SCALE } from "../typography/scale.js";
|
|
31
|
-
import { EMOJI_CATEGORY_ICONS, EMOJI_CATEGORY_SIZE, EMOJI_CELL, PANEL_RADIUS, SKIN_TONE_SWATCHES, applySkinTone, emojiChar, filterEmojiGroups, resolveChatComposerPalette } from "./shared.js";
|
|
32
|
-
import { dataHook, useChatComposerWebCss } from "./web-hooks.js";
|
|
33
|
-
import { useMessages } from "../locale/messages.js";
|
|
34
|
-
import { CHAT_COMPOSER_MESSAGES } from "./messages.js";
|
|
35
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
36
|
-
const HEADER_HEIGHT = 26;
|
|
37
|
-
const EMOJI_TAB = '__emoji';
|
|
38
|
-
function chunk(entries, columns) {
|
|
39
|
-
const out = [];
|
|
40
|
-
for (let i = 0; i < entries.length; i += columns) out.push(entries.slice(i, i + columns));
|
|
41
|
-
return out;
|
|
42
|
-
}
|
|
43
|
-
function entryName(entry, char) {
|
|
44
|
-
return typeof entry === 'string' ? char : entry.name ?? char;
|
|
45
|
-
}
|
|
46
|
-
export function EmojiPicker({
|
|
47
|
-
groups,
|
|
48
|
-
onSelectEmoji,
|
|
49
|
-
activeGroup,
|
|
50
|
-
defaultActiveGroup,
|
|
51
|
-
onActiveGroupChange,
|
|
52
|
-
query,
|
|
53
|
-
defaultQuery = '',
|
|
54
|
-
onQueryChange,
|
|
55
|
-
filter = true,
|
|
56
|
-
frequentlyUsed,
|
|
57
|
-
skinTone,
|
|
58
|
-
defaultSkinTone = 0,
|
|
59
|
-
onSkinToneChange,
|
|
60
|
-
columns = 8,
|
|
61
|
-
height = 288,
|
|
62
|
-
tabs,
|
|
63
|
-
activeTab,
|
|
64
|
-
onActiveTabChange,
|
|
65
|
-
labels: labelOverrides,
|
|
66
|
-
style,
|
|
67
|
-
testID,
|
|
68
|
-
accessibilityLabel: accessibilityLabelProp
|
|
69
|
-
}) {
|
|
70
|
-
const theme = useTheme();
|
|
71
|
-
const palette = resolveChatComposerPalette(theme, useCardFill(style));
|
|
72
|
-
useChatComposerWebCss();
|
|
73
|
-
const {
|
|
74
|
-
messages
|
|
75
|
-
} = useMessages(CHAT_COMPOSER_MESSAGES);
|
|
76
|
-
const accessibilityLabel = accessibilityLabelProp ?? messages.emojiPicker;
|
|
77
|
-
const labels = {
|
|
78
|
-
search: messages.searchEmoji,
|
|
79
|
-
empty: messages.noEmoji,
|
|
80
|
-
frequent: messages.frequentlyUsed,
|
|
81
|
-
skinTone: messages.skinTone,
|
|
82
|
-
emojiTab: messages.emoji,
|
|
83
|
-
...labelOverrides
|
|
84
|
-
};
|
|
85
|
-
const [search, setSearch] = useControllableState({
|
|
86
|
-
value: query,
|
|
87
|
-
defaultValue: defaultQuery,
|
|
88
|
-
onChange: onQueryChange
|
|
89
|
-
});
|
|
90
|
-
const [tone, setTone] = useControllableState({
|
|
91
|
-
value: skinTone,
|
|
92
|
-
defaultValue: defaultSkinTone,
|
|
93
|
-
onChange: onSkinToneChange
|
|
94
|
-
});
|
|
95
|
-
const [category, setCategory] = useControllableState({
|
|
96
|
-
value: activeGroup,
|
|
97
|
-
defaultValue: defaultActiveGroup ?? groups[0]?.key ?? '',
|
|
98
|
-
onChange: onActiveGroupChange
|
|
99
|
-
});
|
|
100
|
-
const [tab, setTab] = useControllableState({
|
|
101
|
-
value: activeTab,
|
|
102
|
-
defaultValue: EMOJI_TAB,
|
|
103
|
-
onChange: onActiveTabChange
|
|
104
|
-
});
|
|
105
|
-
const [toneOpen, setToneOpen] = useState(false);
|
|
106
|
-
const listRef = useRef(null);
|
|
107
|
-
const visible = useMemo(() => filter ? filterEmojiGroups(groups, search) : groups, [filter, groups, search]);
|
|
108
|
-
const {
|
|
109
|
-
rows,
|
|
110
|
-
offsets,
|
|
111
|
-
heights,
|
|
112
|
-
headerIndex
|
|
113
|
-
} = useMemo(() => {
|
|
114
|
-
const all = [];
|
|
115
|
-
if (frequentlyUsed && frequentlyUsed.length > 0 && !search.trim()) {
|
|
116
|
-
all.push({
|
|
117
|
-
key: 'frequent',
|
|
118
|
-
label: labels.frequent,
|
|
119
|
-
emojis: frequentlyUsed
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
all.push(...visible);
|
|
123
|
-
const built = [];
|
|
124
|
-
const index = {};
|
|
125
|
-
for (const group of all) {
|
|
126
|
-
index[group.key] = built.length;
|
|
127
|
-
built.push({
|
|
128
|
-
kind: 'header',
|
|
129
|
-
key: `h-${group.key}`,
|
|
130
|
-
label: group.label
|
|
131
|
-
});
|
|
132
|
-
chunk(group.emojis, columns).forEach((entries, i) => built.push({
|
|
133
|
-
kind: 'emojis',
|
|
134
|
-
key: `${group.key}-${i}`,
|
|
135
|
-
entries
|
|
136
|
-
}));
|
|
137
|
-
}
|
|
138
|
-
const rowHeights = built.map(row => row.kind === 'header' ? HEADER_HEIGHT : EMOJI_CELL);
|
|
139
|
-
const rowOffsets = [];
|
|
140
|
-
let running = 0;
|
|
141
|
-
for (const h of rowHeights) {
|
|
142
|
-
rowOffsets.push(running);
|
|
143
|
-
running += h;
|
|
144
|
-
}
|
|
145
|
-
return {
|
|
146
|
-
rows: built,
|
|
147
|
-
offsets: rowOffsets,
|
|
148
|
-
heights: rowHeights,
|
|
149
|
-
headerIndex: index
|
|
150
|
-
};
|
|
151
|
-
}, [columns, frequentlyUsed, labels.frequent, search, visible]);
|
|
152
|
-
const jumpTo = useCallback(key => {
|
|
153
|
-
setCategory(key);
|
|
154
|
-
const at = headerIndex[key];
|
|
155
|
-
if (at === undefined) return;
|
|
156
|
-
listRef.current?.scrollToOffset({
|
|
157
|
-
offset: offsets[at] ?? 0,
|
|
158
|
-
animated: true
|
|
159
|
-
});
|
|
160
|
-
}, [headerIndex, offsets, setCategory]);
|
|
161
|
-
const renderRow = useCallback(({
|
|
162
|
-
item
|
|
163
|
-
}) => {
|
|
164
|
-
if (item.kind === 'header') {
|
|
165
|
-
return /*#__PURE__*/_jsx(View, {
|
|
166
|
-
style: {
|
|
167
|
-
height: HEADER_HEIGHT,
|
|
168
|
-
justifyContent: 'flex-end',
|
|
169
|
-
paddingLeft: 6
|
|
170
|
-
},
|
|
171
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
172
|
-
variant: "caption-1-medium",
|
|
173
|
-
style: {
|
|
174
|
-
color: palette.textSecondary
|
|
175
|
-
},
|
|
176
|
-
children: item.label
|
|
177
|
-
})
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
return /*#__PURE__*/_jsx(View, {
|
|
181
|
-
style: {
|
|
182
|
-
flexDirection: 'row',
|
|
183
|
-
height: EMOJI_CELL
|
|
184
|
-
},
|
|
185
|
-
children: item.entries.map((entry, i) => {
|
|
186
|
-
const base = emojiChar(entry);
|
|
187
|
-
const char = applySkinTone(base, tone);
|
|
188
|
-
return /*#__PURE__*/_jsx(Button, {
|
|
189
|
-
appearance: "plain",
|
|
190
|
-
tone: "neutral",
|
|
191
|
-
accessibilityLabel: entryName(entry, char),
|
|
192
|
-
onPress: () => onSelectEmoji?.(char),
|
|
193
|
-
style: {
|
|
194
|
-
padding: 0,
|
|
195
|
-
minWidth: 0,
|
|
196
|
-
minHeight: 0,
|
|
197
|
-
flexShrink: 0,
|
|
198
|
-
width: EMOJI_CELL,
|
|
199
|
-
height: EMOJI_CELL,
|
|
200
|
-
alignItems: 'center',
|
|
201
|
-
justifyContent: 'center',
|
|
202
|
-
borderRadius: 8
|
|
203
|
-
},
|
|
204
|
-
testID: testID ? `${testID}-emoji-${base}` : undefined,
|
|
205
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
206
|
-
variant: "title-2-regular",
|
|
207
|
-
children: char
|
|
208
|
-
})
|
|
209
|
-
}, `${base}-${i}`);
|
|
210
|
-
})
|
|
211
|
-
});
|
|
212
|
-
}, [onSelectEmoji, palette.textSecondary, testID, tone]);
|
|
213
|
-
const panel = {
|
|
214
|
-
borderRadius: PANEL_RADIUS,
|
|
215
|
-
paddingTop: 8,
|
|
216
|
-
paddingBottom: 8,
|
|
217
|
-
paddingLeft: 8,
|
|
218
|
-
paddingRight: 8,
|
|
219
|
-
gap: 8,
|
|
220
|
-
'--bloom-chat-composer-ring': palette.focusRing
|
|
221
|
-
};
|
|
222
|
-
const topTabs = [{
|
|
223
|
-
key: EMOJI_TAB,
|
|
224
|
-
label: labels.emojiTab,
|
|
225
|
-
icon: RiEmotionLine
|
|
226
|
-
}, ...(tabs ?? [])];
|
|
227
|
-
const activeCustom = tabs?.find(t => t.key === tab);
|
|
228
|
-
return /*#__PURE__*/_jsxs(Surface, {
|
|
229
|
-
accessibilityLabel: accessibilityLabel,
|
|
230
|
-
style: [panel, style],
|
|
231
|
-
testID: testID,
|
|
232
|
-
children: [tabs && tabs.length > 0 ? /*#__PURE__*/_jsx(View, {
|
|
233
|
-
accessibilityRole: "tablist",
|
|
234
|
-
style: {
|
|
235
|
-
flexDirection: 'row',
|
|
236
|
-
gap: 4
|
|
237
|
-
},
|
|
238
|
-
testID: testID ? `${testID}-tabs` : undefined,
|
|
239
|
-
children: topTabs.map(entry => {
|
|
240
|
-
const selected = entry.key === tab;
|
|
241
|
-
return /*#__PURE__*/_jsx(Pressable, {
|
|
242
|
-
...dataHook('bloomChatComposerRow'),
|
|
243
|
-
accessibilityRole: "tab",
|
|
244
|
-
accessibilityLabel: entry.label,
|
|
245
|
-
"aria-selected": selected,
|
|
246
|
-
accessibilityState: {
|
|
247
|
-
selected
|
|
248
|
-
},
|
|
249
|
-
onPress: () => setTab(entry.key),
|
|
250
|
-
style: {
|
|
251
|
-
flexGrow: 1,
|
|
252
|
-
alignItems: 'center',
|
|
253
|
-
justifyContent: 'center',
|
|
254
|
-
height: 30,
|
|
255
|
-
borderRadius: 9999,
|
|
256
|
-
backgroundColor: selected ? palette.accentSoft : 'transparent'
|
|
257
|
-
},
|
|
258
|
-
testID: testID ? `${testID}-tab-${entry.key}` : undefined,
|
|
259
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
260
|
-
variant: "body-2-medium",
|
|
261
|
-
style: {
|
|
262
|
-
color: selected ? palette.accentStrong : palette.textSecondary
|
|
263
|
-
},
|
|
264
|
-
children: entry.label
|
|
265
|
-
})
|
|
266
|
-
}, entry.key);
|
|
267
|
-
})
|
|
268
|
-
}) : null, activeCustom ? /*#__PURE__*/_jsx(View, {
|
|
269
|
-
style: {
|
|
270
|
-
height
|
|
271
|
-
},
|
|
272
|
-
children: activeCustom.content
|
|
273
|
-
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
274
|
-
children: [/*#__PURE__*/_jsxs(View, {
|
|
275
|
-
style: {
|
|
276
|
-
flexDirection: 'row',
|
|
277
|
-
alignItems: 'center',
|
|
278
|
-
gap: 6
|
|
279
|
-
},
|
|
280
|
-
children: [/*#__PURE__*/_jsxs(View, {
|
|
281
|
-
style: {
|
|
282
|
-
flexGrow: 1,
|
|
283
|
-
flexShrink: 1,
|
|
284
|
-
flexDirection: 'row',
|
|
285
|
-
alignItems: 'center',
|
|
286
|
-
gap: 6,
|
|
287
|
-
height: 32,
|
|
288
|
-
borderRadius: 10,
|
|
289
|
-
backgroundColor: palette.inset,
|
|
290
|
-
paddingLeft: 8,
|
|
291
|
-
paddingRight: 8
|
|
292
|
-
},
|
|
293
|
-
children: [/*#__PURE__*/_jsx(RiSearchLine, {
|
|
294
|
-
width: 16,
|
|
295
|
-
height: 16,
|
|
296
|
-
fill: palette.iconSecondary
|
|
297
|
-
}), /*#__PURE__*/_jsx(TextInput, {
|
|
298
|
-
...dataHook('bloomChatComposerInput'),
|
|
299
|
-
accessibilityLabel: labels.search,
|
|
300
|
-
placeholder: labels.search,
|
|
301
|
-
placeholderTextColor: palette.textPlaceholder,
|
|
302
|
-
value: search,
|
|
303
|
-
onChangeText: setSearch,
|
|
304
|
-
selectionColor: palette.accent,
|
|
305
|
-
style: {
|
|
306
|
-
flexGrow: 1,
|
|
307
|
-
flexShrink: 1,
|
|
308
|
-
padding: 0,
|
|
309
|
-
margin: 0,
|
|
310
|
-
...TYPE_SCALE['body-2-regular'],
|
|
311
|
-
color: palette.text,
|
|
312
|
-
backgroundColor: 'transparent'
|
|
313
|
-
},
|
|
314
|
-
testID: testID ? `${testID}-search` : undefined
|
|
315
|
-
})]
|
|
316
|
-
}), /*#__PURE__*/_jsx(Button, {
|
|
317
|
-
appearance: "plain",
|
|
318
|
-
tone: "neutral",
|
|
319
|
-
accessibilityLabel: labels.skinTone,
|
|
320
|
-
"aria-expanded": toneOpen,
|
|
321
|
-
onPress: () => setToneOpen(!toneOpen),
|
|
322
|
-
style: {
|
|
323
|
-
padding: 0,
|
|
324
|
-
minWidth: 0,
|
|
325
|
-
minHeight: 0,
|
|
326
|
-
flexShrink: 0,
|
|
327
|
-
width: 32,
|
|
328
|
-
height: 32,
|
|
329
|
-
alignItems: 'center',
|
|
330
|
-
justifyContent: 'center',
|
|
331
|
-
borderRadius: 9999,
|
|
332
|
-
backgroundColor: toneOpen ? palette.hover : palette.inset
|
|
333
|
-
},
|
|
334
|
-
testID: testID ? `${testID}-skin-tone` : undefined,
|
|
335
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
336
|
-
variant: "body-regular",
|
|
337
|
-
children: SKIN_TONE_SWATCHES[tone] ?? SKIN_TONE_SWATCHES[0]
|
|
338
|
-
})
|
|
339
|
-
})]
|
|
340
|
-
}), toneOpen ? /*#__PURE__*/_jsx(View, {
|
|
341
|
-
style: {
|
|
342
|
-
flexDirection: 'row',
|
|
343
|
-
gap: 2,
|
|
344
|
-
justifyContent: 'flex-end'
|
|
345
|
-
},
|
|
346
|
-
testID: testID ? `${testID}-skin-tones` : undefined,
|
|
347
|
-
children: SKIN_TONE_SWATCHES.map((swatch, index) => {
|
|
348
|
-
const selected = index === tone;
|
|
349
|
-
return /*#__PURE__*/_jsx(Button, {
|
|
350
|
-
appearance: "plain",
|
|
351
|
-
tone: "neutral",
|
|
352
|
-
accessibilityLabel: `${labels.skinTone} ${index + 1}`,
|
|
353
|
-
pressed: selected,
|
|
354
|
-
onPress: () => {
|
|
355
|
-
setTone(index);
|
|
356
|
-
setToneOpen(false);
|
|
357
|
-
},
|
|
358
|
-
style: {
|
|
359
|
-
padding: 0,
|
|
360
|
-
minWidth: 0,
|
|
361
|
-
minHeight: 0,
|
|
362
|
-
flexShrink: 0,
|
|
363
|
-
width: 30,
|
|
364
|
-
height: 30,
|
|
365
|
-
alignItems: 'center',
|
|
366
|
-
justifyContent: 'center',
|
|
367
|
-
borderRadius: 9999,
|
|
368
|
-
backgroundColor: selected ? palette.accentSoft : 'transparent'
|
|
369
|
-
},
|
|
370
|
-
testID: testID ? `${testID}-skin-tone-${index}` : undefined,
|
|
371
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
372
|
-
variant: "body-regular",
|
|
373
|
-
children: swatch
|
|
374
|
-
})
|
|
375
|
-
}, index);
|
|
376
|
-
})
|
|
377
|
-
}) : null, /*#__PURE__*/_jsx(View, {
|
|
378
|
-
accessibilityRole: "tablist",
|
|
379
|
-
style: {
|
|
380
|
-
flexDirection: 'row',
|
|
381
|
-
justifyContent: 'space-between'
|
|
382
|
-
},
|
|
383
|
-
testID: testID ? `${testID}-categories` : undefined,
|
|
384
|
-
children: groups.map(group => {
|
|
385
|
-
const selected = group.key === category;
|
|
386
|
-
const Glyph = group.icon ?? EMOJI_CATEGORY_ICONS[group.key] ?? RiEmotionLine;
|
|
387
|
-
return /*#__PURE__*/_jsx(Pressable, {
|
|
388
|
-
...dataHook('bloomChatComposerControl'),
|
|
389
|
-
accessibilityRole: "tab",
|
|
390
|
-
accessibilityLabel: group.label,
|
|
391
|
-
"aria-selected": selected,
|
|
392
|
-
accessibilityState: {
|
|
393
|
-
selected
|
|
394
|
-
},
|
|
395
|
-
onPress: () => jumpTo(group.key),
|
|
396
|
-
style: {
|
|
397
|
-
width: EMOJI_CATEGORY_SIZE,
|
|
398
|
-
height: EMOJI_CATEGORY_SIZE,
|
|
399
|
-
alignItems: 'center',
|
|
400
|
-
justifyContent: 'center',
|
|
401
|
-
borderRadius: 9999,
|
|
402
|
-
backgroundColor: selected ? palette.accentSoft : 'transparent'
|
|
403
|
-
},
|
|
404
|
-
testID: testID ? `${testID}-category-${group.key}` : undefined,
|
|
405
|
-
children: /*#__PURE__*/_jsx(Glyph, {
|
|
406
|
-
width: 18,
|
|
407
|
-
height: 18,
|
|
408
|
-
fill: selected ? palette.accentStrong : palette.iconSecondary
|
|
409
|
-
})
|
|
410
|
-
}, group.key);
|
|
411
|
-
})
|
|
412
|
-
}), rows.length === 0 ? /*#__PURE__*/_jsx(View, {
|
|
413
|
-
style: {
|
|
414
|
-
height,
|
|
415
|
-
alignItems: 'center',
|
|
416
|
-
justifyContent: 'center'
|
|
417
|
-
},
|
|
418
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
419
|
-
variant: "body-2-regular",
|
|
420
|
-
style: {
|
|
421
|
-
color: palette.textSecondary
|
|
422
|
-
},
|
|
423
|
-
children: labels.empty
|
|
424
|
-
})
|
|
425
|
-
}) : /*#__PURE__*/_jsx(FlatList, {
|
|
426
|
-
ref: listRef,
|
|
427
|
-
...dataHook('bloomChatComposerScroll'),
|
|
428
|
-
data: rows,
|
|
429
|
-
keyExtractor: row => row.key,
|
|
430
|
-
renderItem: renderRow,
|
|
431
|
-
getItemLayout: (_data, index) => ({
|
|
432
|
-
length: heights[index] ?? EMOJI_CELL,
|
|
433
|
-
offset: offsets[index] ?? 0,
|
|
434
|
-
index
|
|
435
|
-
}),
|
|
436
|
-
style: {
|
|
437
|
-
height
|
|
438
|
-
},
|
|
439
|
-
showsVerticalScrollIndicator: false,
|
|
440
|
-
testID: testID ? `${testID}-grid` : undefined
|
|
441
|
-
})]
|
|
442
|
-
})]
|
|
443
|
-
});
|
|
444
|
-
}
|
|
5
|
+
import { createEmojiPicker } from "./create-emoji-picker.js";
|
|
6
|
+
export const EmojiPicker = createEmojiPicker({
|
|
7
|
+
Surface,
|
|
8
|
+
Button
|
|
9
|
+
});
|
|
445
10
|
//# sourceMappingURL=EmojiPicker.js.map
|