@oracle/oraclejet-preact 14.1.8 → 14.1.10
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/amd/Badge-cee718c2.js +2 -0
- package/amd/{Badge-3c1f7f8b.js.map → Badge-cee718c2.js.map} +1 -1
- package/amd/BaseButton-21f35d61.js +2 -0
- package/amd/{BaseButton-0f25e403.js.map → BaseButton-21f35d61.js.map} +1 -1
- package/amd/Button-9e2b5706.js +2 -0
- package/amd/{Button-315621e2.js.map → Button-9e2b5706.js.map} +1 -1
- package/amd/Chip-0ffb2726.js +2 -0
- package/amd/{Chip-69627ba2.js.map → Chip-0ffb2726.js.map} +1 -1
- package/amd/ClearIcon-17f117c0.js +2 -0
- package/amd/{ClearIcon-a009d82d.js.map → ClearIcon-17f117c0.js.map} +1 -1
- package/amd/{Collection-d3ef1b6f.js → Collection-937ee8ba.js} +1 -1
- package/amd/{Collection-d3ef1b6f.js.map → Collection-937ee8ba.js.map} +1 -1
- package/amd/ComponentMessage-3fae5a5b.js +2 -0
- package/amd/{ComponentMessage-b39def70.js.map → ComponentMessage-3fae5a5b.js.map} +1 -1
- package/amd/{ComponentMessageContainer-151ad7a2.js → ComponentMessageContainer-2130cdd7.js} +2 -2
- package/amd/{ComponentMessageContainer-151ad7a2.js.map → ComponentMessageContainer-2130cdd7.js.map} +1 -1
- package/amd/Divider-c177794c.js +2 -0
- package/amd/{Divider-139aab12.js.map → Divider-c177794c.js.map} +1 -1
- package/amd/{FilePicker-df6e5ba2.js → FilePicker-29e7242f.js} +2 -2
- package/amd/{FilePicker-df6e5ba2.js.map → FilePicker-29e7242f.js.map} +1 -1
- package/amd/Flex-343c337e.js +2 -0
- package/amd/{Flex-49ae9d40.js.map → Flex-343c337e.js.map} +1 -1
- package/amd/{Floating-0d08c31b.js → Floating-f251f4e6.js} +2 -2
- package/amd/{Floating-0d08c31b.js.map → Floating-f251f4e6.js.map} +1 -1
- package/amd/FocusTrap-3123561d.js +2 -0
- package/amd/{FocusTrap-36eb14b3.js.map → FocusTrap-3123561d.js.map} +1 -1
- package/amd/FormControlUtils-3c0aac96.js +2 -0
- package/amd/{FormControlUtils-9dc2f278.js.map → FormControlUtils-3c0aac96.js.map} +1 -1
- package/amd/Heading-c1db732f.js +2 -0
- package/amd/{Heading-1940acfa.js.map → Heading-c1db732f.js.map} +1 -1
- package/amd/HiddenAccessible-c1b8ec8e.js +2 -0
- package/amd/{HiddenAccessible-75a88dca.js.map → HiddenAccessible-c1b8ec8e.js.map} +1 -1
- package/amd/{HighlightText-98c703c0.js → HighlightText-cc2d6b7d.js} +2 -2
- package/amd/{HighlightText-98c703c0.js.map → HighlightText-cc2d6b7d.js.map} +1 -1
- package/amd/Icon-597b4544.js +2 -0
- package/amd/{Icon-09d9aaef.js.map → Icon-597b4544.js.map} +1 -1
- package/amd/Indexer-49249ca7.js +2 -0
- package/amd/{Indexer-0d377bbe.js.map → Indexer-49249ca7.js.map} +1 -1
- package/amd/InlineHelpSource-466d3759.js +2 -0
- package/amd/{InlineHelpSource-ee7d0235.js.map → InlineHelpSource-466d3759.js.map} +1 -1
- package/amd/Link-a1200bb1.js +2 -0
- package/amd/{Link-60e402da.js.map → Link-a1200bb1.js.map} +1 -1
- package/amd/List-6a963297.js +2 -0
- package/amd/{List-60513105.js.map → List-6a963297.js.map} +1 -1
- package/amd/ListItemTextLayout-998eec81.js +2 -0
- package/amd/{ListItemTextLayout-a6d9f3f9.js.map → ListItemTextLayout-998eec81.js.map} +1 -1
- package/amd/{ListView-aa70a216.js → ListView-02b66ff8.js} +2 -2
- package/amd/{ListView-aa70a216.js.map → ListView-02b66ff8.js.map} +1 -1
- package/amd/{LoadMoreCollection-2a7397a6.js → LoadMoreCollection-62a53e76.js} +2 -2
- package/amd/{LoadMoreCollection-2a7397a6.js.map → LoadMoreCollection-62a53e76.js.map} +1 -1
- package/amd/Menu-1d0186bf.js +2 -0
- package/amd/{Menu-dc7eb813.js.map → Menu-1d0186bf.js.map} +1 -1
- package/amd/MenuDivider-7edd8ac2.js +2 -0
- package/amd/{MenuDivider-0746142f.js.map → MenuDivider-7edd8ac2.js.map} +1 -1
- package/amd/MenuItem-077784e6.js +2 -0
- package/amd/{MenuItem-558c427d.js.map → MenuItem-077784e6.js.map} +1 -1
- package/amd/{Message.types-36b055bd.js → Message.types-84dcb531.js} +1 -1
- package/amd/{Message.types-36b055bd.js.map → Message.types-84dcb531.js.map} +1 -1
- package/amd/MessageCloseButton-2ab50565.js +2 -0
- package/amd/{MessageCloseButton-9115578a.js.map → MessageCloseButton-2ab50565.js.map} +1 -1
- package/amd/MessageDetail-c3d3a0cf.js +2 -0
- package/amd/{MessageDetail-bca5d0e6.js.map → MessageDetail-c3d3a0cf.js.map} +1 -1
- package/amd/{MessageFormattingUtils-2f6ea3d7.js → MessageFormattingUtils-a178900f.js} +2 -2
- package/amd/{MessageFormattingUtils-2f6ea3d7.js.map → MessageFormattingUtils-a178900f.js.map} +1 -1
- package/amd/MessageLayer-a6a7abcf.js +2 -0
- package/amd/{MessageLayer-6345dea9.js.map → MessageLayer-a6a7abcf.js.map} +1 -1
- package/amd/MessageStartIcon-3d36c660.js +2 -0
- package/amd/{MessageStartIcon-a7b50582.js.map → MessageStartIcon-3d36c660.js.map} +1 -1
- package/amd/MessageSummary-a4283ef2.js +2 -0
- package/amd/{MessageSummary-8871a900.js.map → MessageSummary-a4283ef2.js.map} +1 -1
- package/amd/MessageTimestamp-e56a6681.js +2 -0
- package/amd/{MessageTimestamp-0b535a61.js.map → MessageTimestamp-e56a6681.js.map} +1 -1
- package/amd/MessageToast-c6d596ce.js +2 -0
- package/amd/{MessageToast-973879f6.js.map → MessageToast-c6d596ce.js.map} +1 -1
- package/amd/{MessageUtils-fc40878e.js → MessageUtils-a930918a.js} +2 -2
- package/amd/{MessageUtils-fc40878e.js.map → MessageUtils-a930918a.js.map} +1 -1
- package/amd/{MessagesManager-43519abe.js → MessagesManager-4cf3413e.js} +2 -2
- package/amd/{MessagesManager-43519abe.js.map → MessagesManager-4cf3413e.js.map} +1 -1
- package/amd/MeterCircle-b06a457d.js +2 -0
- package/amd/{MeterCircle-99d0ae85.js.map → MeterCircle-b06a457d.js.map} +1 -1
- package/amd/Modal-eebbf595.js +2 -0
- package/amd/{Modal-4ef84a44.js.map → Modal-eebbf595.js.map} +1 -1
- package/amd/{NumberInputText-8ae0414b.js → NumberInputText-0b71cdfd.js} +2 -2
- package/amd/{NumberInputText-8ae0414b.js.map → NumberInputText-0b71cdfd.js.map} +1 -1
- package/amd/PRIVATE_Collection/__tests__/Collection.spec.js +1 -1
- package/amd/PRIVATE_Collection.js +1 -1
- package/amd/PRIVATE_List/__tests__/List.spec.js +1 -1
- package/amd/PRIVATE_List.css +15 -15
- package/amd/PRIVATE_List.js +1 -1
- package/amd/PRIVATE_Message/__tests__/MessageCloseButton.spec.js +1 -1
- package/amd/PRIVATE_Message/__tests__/MessageDetail.spec.js +1 -1
- package/amd/PRIVATE_Message/__tests__/MessageFormattingUtils.spec.js +1 -1
- package/amd/PRIVATE_Message/__tests__/MessageStartIcon.spec.js +1 -1
- package/amd/PRIVATE_Message/__tests__/MessageSummary.spec.js +1 -1
- package/amd/PRIVATE_Message/__tests__/MessageTimestamp.spec.js +1 -1
- package/amd/PRIVATE_Message/__tests__/MessageUtils.spec.js +1 -1
- package/amd/PRIVATE_Message/__tests__/MessagesManager.spec.js +1 -1
- package/amd/PRIVATE_Message.css +27 -27
- package/amd/PRIVATE_Message.js +1 -1
- package/amd/PRIVATE_Message.js.map +1 -1
- package/amd/PRIVATE_MessageLayer/__tests__/MessageLayer.spec.js +1 -1
- package/amd/PRIVATE_MessageLayer.css +7 -7
- package/amd/PRIVATE_MessageLayer.js +1 -1
- package/amd/PRIVATE_Meter.js +1 -1
- package/amd/PRIVATE_SelectCommon.css +13 -13
- package/amd/PRIVATE_SelectCommon.js +1 -1
- package/amd/PRIVATE_SelectCommon.js.map +1 -1
- package/amd/PRIVATE_VirtualizedCollection/__tests__/VirtualizedCollection.spec.js +1 -1
- package/amd/PRIVATE_VirtualizedCollection.js +1 -1
- package/amd/ReadonlyTextFieldInput-ee580a50.js +2 -0
- package/amd/{ReadonlyTextFieldInput-2ff54b4e.js.map → ReadonlyTextFieldInput-ee580a50.js.map} +1 -1
- package/amd/SelectMenuItem-7033aea6.js +2 -0
- package/amd/{SelectMenuItem-70865f13.js.map → SelectMenuItem-7033aea6.js.map} +1 -1
- package/amd/{SelectMultiple-70f2dc35.js → SelectMultiple-1e654222.js} +2 -2
- package/amd/{SelectMultiple-70f2dc35.js.map → SelectMultiple-1e654222.js.map} +1 -1
- package/amd/{SelectSingle-0d194190.js → SelectSingle-1af85560.js} +2 -2
- package/amd/{SelectSingle-0d194190.js.map → SelectSingle-1af85560.js.map} +1 -1
- package/amd/Skeleton-82005513.js +2 -0
- package/amd/{Skeleton-13c57283.js.map → Skeleton-82005513.js.map} +1 -1
- package/amd/{Spacer-60e84b7d.js → Spacer-a798f8d0.js} +2 -2
- package/amd/{Spacer-60e84b7d.js.map → Spacer-a798f8d0.js.map} +1 -1
- package/amd/SplitMenuButton-24a8bc3e.js +2 -0
- package/amd/{SplitMenuButton-34bda460.js.map → SplitMenuButton-24a8bc3e.js.map} +1 -1
- package/amd/Subheading-9ed4bf87.js +2 -0
- package/amd/{Subheading-53920c82.js.map → Subheading-9ed4bf87.js.map} +1 -1
- package/amd/Text-414830df.js +2 -0
- package/amd/{Text-dd98aad8.js.map → Text-414830df.js.map} +1 -1
- package/amd/TextArea-5b0671f9.js +2 -0
- package/amd/{TextArea-f5ceacdf.js.map → TextArea-5b0671f9.js.map} +1 -1
- package/amd/{TextAreaAutosize-8fd80df5.js → TextAreaAutosize-ed0589cf.js} +2 -2
- package/amd/{TextAreaAutosize-8fd80df5.js.map → TextAreaAutosize-ed0589cf.js.map} +1 -1
- package/amd/TextFieldInput-57f2d560.js +2 -0
- package/amd/{TextFieldInput-e8475857.js.map → TextFieldInput-57f2d560.js.map} +1 -1
- package/amd/UNSAFE_AspectRatio.css +1 -1
- package/amd/UNSAFE_AspectRatio.js +1 -1
- package/amd/UNSAFE_Avatar/__tests__/Avatar.spec.js +1 -1
- package/amd/UNSAFE_Avatar.css +8 -8
- package/amd/UNSAFE_Avatar.js +1 -1
- package/amd/UNSAFE_Avatar.js.map +1 -1
- package/amd/UNSAFE_Badge/__tests__/Badge.spec.js +1 -1
- package/amd/UNSAFE_Badge.css +13 -13
- package/amd/UNSAFE_Badge.js +1 -1
- package/amd/UNSAFE_BaseButton/__tests__/BaseButton.spec.js +1 -1
- package/amd/UNSAFE_BaseButton.css +15 -15
- package/amd/UNSAFE_BaseButton.js +1 -1
- package/amd/UNSAFE_Button/__tests__/Button.spec.js +1 -1
- package/amd/UNSAFE_Button.css +7 -7
- package/amd/UNSAFE_Button.js +1 -1
- package/amd/UNSAFE_Center.js +1 -1
- package/amd/UNSAFE_Chip/__tests__/Chip.spec.js +1 -1
- package/amd/UNSAFE_Chip.css +7 -7
- package/amd/UNSAFE_Chip.js +1 -1
- package/amd/UNSAFE_Collapsible.css +8 -8
- package/amd/UNSAFE_Collapsible.js +1 -1
- package/amd/UNSAFE_Collapsible.js.map +1 -1
- package/amd/UNSAFE_ComponentMessage/__tests__/ComponentMessage.spec.js +1 -1
- package/amd/UNSAFE_ComponentMessage/__tests__/ComponentMessageContainer.spec.js +1 -1
- package/amd/UNSAFE_ComponentMessage.css +2 -2
- package/amd/UNSAFE_ComponentMessage.js +1 -1
- package/amd/UNSAFE_Divider/__tests__/Divider.spec.js +1 -1
- package/amd/UNSAFE_Divider.css +1 -1
- package/amd/UNSAFE_Divider.js +1 -1
- package/amd/UNSAFE_FilePicker/__tests__/FilePicker.spec.js +1 -1
- package/amd/UNSAFE_FilePicker.css +6 -6
- package/amd/UNSAFE_FilePicker.js +1 -1
- package/amd/UNSAFE_Flex/__tests__/Flex.spec.js +1 -1
- package/amd/UNSAFE_Flex.css +2 -2
- package/amd/UNSAFE_Flex.js +1 -1
- package/amd/UNSAFE_Floating/__tests__/Floating.spec.js +1 -1
- package/amd/UNSAFE_Floating.js +1 -1
- package/amd/UNSAFE_FocusTrap/__tests__/FocusTrap.spec.js +1 -1
- package/amd/UNSAFE_FocusTrap.css +2 -2
- package/amd/UNSAFE_FocusTrap.js +1 -1
- package/amd/UNSAFE_Grid.css +1 -1
- package/amd/UNSAFE_Grid.js +1 -1
- package/amd/UNSAFE_Heading/__test__/Heading.spec.js +1 -1
- package/amd/UNSAFE_Heading.css +9 -9
- package/amd/UNSAFE_Heading.js +1 -1
- package/amd/UNSAFE_HiddenAccessible/__tests__/HiddenAccessible.spec.js +1 -1
- package/amd/UNSAFE_HiddenAccessible.css +1 -1
- package/amd/UNSAFE_HiddenAccessible.js +1 -1
- package/amd/UNSAFE_HighlightText/__tests__/HighlightText.spec.js +1 -1
- package/amd/UNSAFE_HighlightText.css +1 -1
- package/amd/UNSAFE_HighlightText.js +1 -1
- package/amd/UNSAFE_Icon/__tests__/Icon.spec.js +1 -1
- package/amd/UNSAFE_Icon/__tests__/Icons.spec.js +1 -1
- package/amd/UNSAFE_Icon.css +8 -8
- package/amd/UNSAFE_Icon.js +1 -1
- package/amd/UNSAFE_Icons.js +1 -1
- package/amd/UNSAFE_Indexer/__tests__/Indexer.spec.js +1 -1
- package/amd/UNSAFE_Indexer.css +7 -7
- package/amd/UNSAFE_Indexer.js +1 -1
- package/amd/UNSAFE_InputPassword/__tests__/InputPassword.spec.js +1 -1
- package/amd/UNSAFE_InputPassword.css +1 -1
- package/amd/UNSAFE_InputPassword.js +1 -1
- package/amd/UNSAFE_InputText.css +1 -1
- package/amd/UNSAFE_InputText.js +1 -1
- package/amd/UNSAFE_Label.css +13 -13
- package/amd/UNSAFE_Label.js +1 -1
- package/amd/UNSAFE_Label.js.map +1 -1
- package/amd/UNSAFE_LabelValueLayout.css +9 -9
- package/amd/UNSAFE_LabelValueLayout.js +1 -1
- package/amd/UNSAFE_LabelValueLayout.js.map +1 -1
- package/amd/UNSAFE_Link/__tests__/Link.spec.js +1 -1
- package/amd/UNSAFE_Link.css +5 -5
- package/amd/UNSAFE_Link.js +1 -1
- package/amd/UNSAFE_ListItemLayout/__tests__/ListItemLayout.spec.js +1 -1
- package/amd/UNSAFE_ListItemLayout.css +9 -9
- package/amd/UNSAFE_ListItemLayout.js +1 -1
- package/amd/UNSAFE_ListView/__tests__/ListView.spec.js +1 -1
- package/amd/UNSAFE_ListView/__tests__/ListViewTabbableMode.spec.js +1 -1
- package/amd/UNSAFE_ListView.js +1 -1
- package/amd/UNSAFE_LiveRegion.css +1 -1
- package/amd/UNSAFE_LiveRegion.js +1 -1
- package/amd/UNSAFE_LiveRegion.js.map +1 -1
- package/amd/UNSAFE_LoadMoreCollection/__tests__/LoadMoreCollection.spec.js +1 -1
- package/amd/UNSAFE_LoadMoreCollection.js +1 -1
- package/amd/UNSAFE_Menu/__tests__/Menu.spec.js +1 -1
- package/amd/UNSAFE_Menu/__tests__/MenuItem.spec.js +1 -1
- package/amd/UNSAFE_Menu/__tests__/SelectMenuItem.spec.js +1 -1
- package/amd/UNSAFE_Menu/__tests__/SelectMultipleMenuGroup.spec.js +1 -1
- package/amd/UNSAFE_Menu/__tests__/SelectSingleMenuGroup.spec.js +1 -1
- package/amd/UNSAFE_Menu.css +23 -23
- package/amd/UNSAFE_Menu.js +1 -1
- package/amd/UNSAFE_MessageBanner.js +1 -1
- package/amd/UNSAFE_MessageToast/__tests__/MessageToast.spec.js +1 -1
- package/amd/UNSAFE_MessageToast.css +1 -1
- package/amd/UNSAFE_MessageToast.js +1 -1
- package/amd/UNSAFE_MeterBar/__tests__/MeterBar.spec.js +1 -1
- package/amd/UNSAFE_MeterBar.css +44 -44
- package/amd/UNSAFE_MeterBar.js +1 -1
- package/amd/UNSAFE_MeterBar.js.map +1 -1
- package/amd/UNSAFE_MeterCircle/__tests__/MeterCircle.spec.js +1 -1
- package/amd/UNSAFE_MeterCircle.css +46 -46
- package/amd/UNSAFE_MeterCircle.js +1 -1
- package/amd/UNSAFE_Modal/__tests__/Modal.spec.js +1 -1
- package/amd/UNSAFE_Modal.css +3 -3
- package/amd/UNSAFE_Modal.js +1 -1
- package/amd/UNSAFE_NumberInputText/__tests__/NumberInputText.spec.js +1 -1
- package/amd/UNSAFE_NumberInputText.js +1 -1
- package/amd/UNSAFE_PrefixSuffix.css +8 -8
- package/amd/UNSAFE_PrefixSuffix.js +1 -1
- package/amd/UNSAFE_PrefixSuffix.js.map +1 -1
- package/amd/UNSAFE_ProgressBar/__tests__/ProgressBar.spec.js +1 -1
- package/amd/UNSAFE_ProgressBar.css +6 -6
- package/amd/UNSAFE_ProgressBar.js +1 -1
- package/amd/UNSAFE_ProgressBar.js.map +1 -1
- package/amd/UNSAFE_ProgressCircle/__tests__/ProgressCircle.spec.js +1 -1
- package/amd/UNSAFE_ProgressCircle.css +6 -6
- package/amd/UNSAFE_ProgressCircle.js +1 -1
- package/amd/UNSAFE_ProgressCircle.js.map +1 -1
- package/amd/UNSAFE_RatingGauge/__tests__/RatingGauge.spec.js +1 -1
- package/amd/UNSAFE_RatingGauge.css +20 -20
- package/amd/UNSAFE_RatingGauge.js +1 -1
- package/amd/UNSAFE_RatingGauge.js.map +1 -1
- package/amd/UNSAFE_SelectMultiple/__tests__/SelectMultiple.spec.js +1 -1
- package/amd/UNSAFE_SelectMultiple.css +1 -1
- package/amd/UNSAFE_SelectMultiple.js +1 -1
- package/amd/UNSAFE_SelectSingle/__tests__/SelectSingle.spec.js +1 -1
- package/amd/UNSAFE_SelectSingle.js +1 -1
- package/amd/UNSAFE_Selector.css +5 -5
- package/amd/UNSAFE_Selector.js +1 -1
- package/amd/UNSAFE_Selector.js.map +1 -1
- package/amd/UNSAFE_Skeleton/__tests__/Skeleton.spec.js +1 -1
- package/amd/UNSAFE_Skeleton.css +1 -1
- package/amd/UNSAFE_Skeleton.js +1 -1
- package/amd/UNSAFE_Spacer/__tests__/Spacer.spec.js +1 -1
- package/amd/UNSAFE_Spacer.js +1 -1
- package/amd/UNSAFE_SplitMenuButton/__tests__/SplitMenuButton.spec.js +1 -1
- package/amd/UNSAFE_SplitMenuButton.css +5 -5
- package/amd/UNSAFE_SplitMenuButton.js +1 -1
- package/amd/UNSAFE_Subheading/__test__/Subheading.spec.js +1 -1
- package/amd/UNSAFE_Subheading.css +8 -8
- package/amd/UNSAFE_Subheading.js +1 -1
- package/amd/UNSAFE_Text/__tests__/Text.spec.js +1 -1
- package/amd/UNSAFE_Text.css +25 -25
- package/amd/UNSAFE_Text.js +1 -1
- package/amd/UNSAFE_TextArea/__tests__/TextArea.spec.js +1 -1
- package/amd/UNSAFE_TextArea.css +3 -3
- package/amd/UNSAFE_TextArea.js +1 -1
- package/amd/UNSAFE_TextAreaAutosize/__tests__/TextAreaAutosize.spec.js +1 -1
- package/amd/UNSAFE_TextAreaAutosize.js +1 -1
- package/amd/UNSAFE_TextField/__tests__/ReadonlyTextFieldInput.spec.js +1 -1
- package/amd/UNSAFE_TextField/__tests__/TextFieldInput.spec.js +1 -1
- package/amd/UNSAFE_TextField.css +58 -58
- package/amd/UNSAFE_TextField.js +1 -1
- package/amd/UNSAFE_TextField.js.map +1 -1
- package/amd/UNSAFE_ThemedIcons.js +1 -1
- package/amd/UNSAFE_UserAssistance/__tests__/InlineHelpSource.spec.js +1 -1
- package/amd/UNSAFE_UserAssistance.css +8 -8
- package/amd/UNSAFE_UserAssistance.js +1 -1
- package/amd/UNSAFE_UserAssistance.js.map +1 -1
- package/amd/UNSAFE_View/__tests__/View.spec.js +1 -1
- package/amd/UNSAFE_View.js +1 -1
- package/amd/UNSAFE_VirtualizedListView/__tests__/VirtualizedListView.spec.js +1 -1
- package/amd/UNSAFE_VirtualizedListView/__tests__/VirtualizedListViewTabbableMode.spec.js +1 -1
- package/amd/UNSAFE_VirtualizedListView.js +1 -1
- package/amd/{VirtualizedCollection-ecf14228.js → VirtualizedCollection-fa7f5bb6.js} +2 -2
- package/amd/{VirtualizedCollection-ecf14228.js.map → VirtualizedCollection-fa7f5bb6.js.map} +1 -1
- package/amd/{VirtualizedListView-226cdec3.js → VirtualizedListView-64a72b62.js} +2 -2
- package/amd/{VirtualizedListView-226cdec3.js.map → VirtualizedListView-64a72b62.js.map} +1 -1
- package/amd/__tests__/FormControls/FormControlAria.spec.js +1 -1
- package/amd/__tests__/FormControls/FormControlClearIcon.spec.js +1 -1
- package/amd/__tests__/FormControls/FormControlCommit.spec.js +1 -1
- package/amd/__tests__/FormControls/FormControlPrefixSuffix.spec.js +1 -1
- package/amd/{_curry1-4bc24d07.js → _curry1-1865bdf8.js} +1 -1
- package/amd/{_curry1-4bc24d07.js.map → _curry1-1865bdf8.js.map} +1 -1
- package/amd/{_curry2-b282d372.js → _curry2-c82c3af2.js} +2 -2
- package/amd/{_curry2-b282d372.js.map → _curry2-c82c3af2.js.map} +1 -1
- package/amd/_curry3-73b7a4f7.js +2 -0
- package/amd/{_curry3-d85ab9e3.js.map → _curry3-73b7a4f7.js.map} +1 -1
- package/amd/_has-af025a25.js +2 -0
- package/amd/{_has-d6e072c4.js.map → _has-af025a25.js.map} +1 -1
- package/amd/{classNames-7ef49daf.js → classNames-f9dd69a8.js} +1 -1
- package/amd/{classNames-7ef49daf.js.map → classNames-f9dd69a8.js.map} +1 -1
- package/amd/clientHints-0a14d5d8.js +2 -0
- package/amd/clientHints-0a14d5d8.js.map +1 -0
- package/amd/flexbox-83e878b1.js +2 -0
- package/amd/{flexbox-af3b62ca.js.map → flexbox-83e878b1.js.map} +1 -1
- package/amd/flexitem-c406a7bb.js +2 -0
- package/amd/{flexitem-7f1eca3f.js.map → flexitem-c406a7bb.js.map} +1 -1
- package/amd/hooks/PRIVATE_useDvtMeterEvents.js +1 -1
- package/amd/hooks/PRIVATE_useSingleSelection.js +1 -1
- package/amd/hooks/UNSAFE_useAnimation/__tests__/useAnimation.spec.js +1 -1
- package/amd/hooks/UNSAFE_useAnimation.js +1 -1
- package/amd/hooks/UNSAFE_useFloating.js +1 -1
- package/amd/hooks/UNSAFE_useFocusWithin/__tests__/useFocusWithin.spec.js +1 -1
- package/amd/hooks/UNSAFE_useFocusWithin.js +1 -1
- package/amd/hooks/UNSAFE_useFocusableTextField.js +1 -1
- package/amd/hooks/UNSAFE_usePrefixSuffix.js +1 -1
- package/amd/hooks/UNSAFE_useTextFieldInputHandlers.js +1 -1
- package/amd/hooks/UNSAFE_useTooltip.css +4 -4
- package/amd/hooks/UNSAFE_useTooltip.js +1 -1
- package/amd/hooks/UNSAFE_useTooltip.js.map +1 -1
- package/amd/{index-03c10d8e.js → index-5dbc066a.js} +2 -2
- package/amd/{index-03c10d8e.js.map → index-5dbc066a.js.map} +1 -1
- package/amd/{index-fbf288d8.js → index-c61f0d48.js} +1 -1
- package/amd/{index-fbf288d8.js.map → index-c61f0d48.js.map} +1 -1
- package/amd/{index-c150ed6e.js → index-efbc9ba1.js} +2 -2
- package/amd/{index-c150ed6e.js.map → index-efbc9ba1.js.map} +1 -1
- package/amd/keys-7dc8fa94.js +2 -0
- package/amd/{keys-2f73271e.js.map → keys-7dc8fa94.js.map} +1 -1
- package/amd/{listViewSelectionTests-fe15066f.js → listViewSelectionTests-b588b493.js} +2 -2
- package/amd/{listViewSelectionTests-fe15066f.js.map → listViewSelectionTests-b588b493.js.map} +1 -1
- package/amd/{listViewTabbableModeTests-4b57a2aa.js → listViewTabbableModeTests-a5b9db5e.js} +2 -2
- package/amd/{listViewTabbableModeTests-4b57a2aa.js.map → listViewTabbableModeTests-a5b9db5e.js.map} +1 -1
- package/amd/{listViewTestFixtures-9b03a7ed.js → listViewTestFixtures-1a67361f.js} +1 -1
- package/amd/{listViewTestFixtures-9b03a7ed.js.map → listViewTestFixtures-1a67361f.js.map} +1 -1
- package/amd/{menuTestsUtils-313bea22.js → menuTestsUtils-b7516a54.js} +1 -1
- package/amd/{menuTestsUtils-313bea22.js.map → menuTestsUtils-b7516a54.js.map} +1 -1
- package/amd/{stringUtils-3b45cc82.js → stringUtils-c7da3cbf.js} +1 -1
- package/amd/{stringUtils-3b45cc82.js.map → stringUtils-c7da3cbf.js.map} +1 -1
- package/amd/{testHelpers-de821fa4.js → testHelpers-1c035a39.js} +1 -1
- package/amd/{testHelpers-de821fa4.js.map → testHelpers-1c035a39.js.map} +1 -1
- package/amd/{tslib.es6-01aa33b9.js → tslib.es6-d809b4dd.js} +1 -1
- package/amd/{tslib.es6-01aa33b9.js.map → tslib.es6-d809b4dd.js.map} +1 -1
- package/amd/{useAnimation-ce597b9d.js → useAnimation-cfb8d533.js} +2 -2
- package/amd/{useAnimation-ce597b9d.js.map → useAnimation-cfb8d533.js.map} +1 -1
- package/amd/{useFocusWithin-3cf07e58.js → useFocusWithin-369336f7.js} +1 -1
- package/amd/{useFocusWithin-3cf07e58.js.map → useFocusWithin-369336f7.js.map} +1 -1
- package/amd/{useModal-9f8b312e.js → useModal-f400de59.js} +1 -1
- package/amd/{useModal-9f8b312e.js.map → useModal-f400de59.js.map} +1 -1
- package/amd/{useSingleSelection-7205bfde.js → useSingleSelection-bdc50b49.js} +1 -1
- package/amd/{useSingleSelection-7205bfde.js.map → useSingleSelection-bdc50b49.js.map} +1 -1
- package/amd/utils/PRIVATE_clientHints/__tests__/clientHints.spec.js +1 -1
- package/amd/utils/PRIVATE_clientHints.js +1 -1
- package/amd/utils/PRIVATE_tabbableUtils.js +1 -1
- package/amd/utils/UNSAFE_classNames/classNames.spec.js +1 -1
- package/amd/utils/UNSAFE_classNames.js +1 -1
- package/amd/utils/UNSAFE_interpolations/boxalignment.css +15 -15
- package/amd/utils/UNSAFE_interpolations/boxalignment.js +1 -1
- package/amd/utils/UNSAFE_interpolations/boxalignment.js.map +1 -1
- package/amd/utils/UNSAFE_interpolations/dimensions.js +1 -1
- package/amd/utils/UNSAFE_interpolations/flexbox/flexbox.spec.js +1 -1
- package/amd/utils/UNSAFE_interpolations/flexbox.css +7 -7
- package/amd/utils/UNSAFE_interpolations/flexbox.js +1 -1
- package/amd/utils/UNSAFE_interpolations/flexitem/flexitem.spec.js +1 -1
- package/amd/utils/UNSAFE_interpolations/flexitem.css +7 -7
- package/amd/utils/UNSAFE_interpolations/flexitem.js +1 -1
- package/amd/utils/UNSAFE_interpolations/text.css +3 -3
- package/amd/utils/UNSAFE_interpolations/text.js +1 -1
- package/amd/utils/UNSAFE_interpolations/text.js.map +1 -1
- package/amd/utils/UNSAFE_logger.js +1 -1
- package/amd/utils/UNSAFE_mergeInterpolations.js +1 -1
- package/amd/utils/UNSAFE_stringUtils/stringUtils.spec.js +1 -1
- package/amd/utils/UNSAFE_stringUtils.js +1 -1
- package/amd/utils/UNSAFE_units.js +1 -1
- package/cjs/{Badge-60e75793.js → Badge-ecbb8eb9.js} +16 -16
- package/cjs/{Badge-60e75793.js.map → Badge-ecbb8eb9.js.map} +1 -1
- package/cjs/{BaseButton-c9febcfe.js → BaseButton-f96d3e90.js} +20 -20
- package/cjs/{BaseButton-c9febcfe.js.map → BaseButton-f96d3e90.js.map} +1 -1
- package/cjs/{Button-998e7e41.js → Button-84ec0ef7.js} +12 -12
- package/cjs/{Button-998e7e41.js.map → Button-84ec0ef7.js.map} +1 -1
- package/cjs/{Chip-b09858e9.js → Chip-f01f3300.js} +10 -10
- package/cjs/{Chip-b09858e9.js.map → Chip-f01f3300.js.map} +1 -1
- package/cjs/{ClearIcon-dc802e98.js → ClearIcon-7807c85a.js} +3 -3
- package/cjs/{ClearIcon-dc802e98.js.map → ClearIcon-7807c85a.js.map} +1 -1
- package/cjs/{Collection-3ee653eb.js → Collection-8aa68a73.js} +2 -2
- package/cjs/{Collection-3ee653eb.js.map → Collection-8aa68a73.js.map} +1 -1
- package/cjs/{ComponentMessage-56bf6c2e.js → ComponentMessage-6ee98d9f.js} +8 -8
- package/cjs/{ComponentMessage-56bf6c2e.js.map → ComponentMessage-6ee98d9f.js.map} +1 -1
- package/cjs/{ComponentMessageContainer-a13a49ee.js → ComponentMessageContainer-c37e1886.js} +5 -5
- package/cjs/{ComponentMessageContainer-a13a49ee.js.map → ComponentMessageContainer-c37e1886.js.map} +1 -1
- package/cjs/{Divider-68e33eab.js → Divider-cc210fcf.js} +3 -3
- package/cjs/{Divider-68e33eab.js.map → Divider-cc210fcf.js.map} +1 -1
- package/cjs/{FilePicker-01193392.js → FilePicker-f1b62bcd.js} +14 -14
- package/cjs/{FilePicker-01193392.js.map → FilePicker-f1b62bcd.js.map} +1 -1
- package/cjs/{Flex-45046adf.js → Flex-0af6eb9c.js} +8 -8
- package/cjs/{Flex-45046adf.js.map → Flex-0af6eb9c.js.map} +1 -1
- package/cjs/{Floating-87d6d5bb.js → Floating-904faa39.js} +3 -3
- package/cjs/{Floating-87d6d5bb.js.map → Floating-904faa39.js.map} +1 -1
- package/cjs/{FocusTrap-39aa9458.js → FocusTrap-b3a67171.js} +5 -5
- package/cjs/{FocusTrap-39aa9458.js.map → FocusTrap-b3a67171.js.map} +1 -1
- package/cjs/{FormControlUtils-00721d61.js → FormControlUtils-12894392.js} +5 -5
- package/cjs/{FormControlUtils-00721d61.js.map → FormControlUtils-12894392.js.map} +1 -1
- package/cjs/{Heading-15175e2e.js → Heading-aedb860d.js} +13 -13
- package/cjs/{Heading-15175e2e.js.map → Heading-aedb860d.js.map} +1 -1
- package/cjs/{HiddenAccessible-77dd0361.js → HiddenAccessible-77b7a6c6.js} +3 -3
- package/cjs/{HiddenAccessible-77dd0361.js.map → HiddenAccessible-77b7a6c6.js.map} +1 -1
- package/cjs/{HighlightText-f73893fa.js → HighlightText-b271c954.js} +3 -3
- package/cjs/{HighlightText-f73893fa.js.map → HighlightText-b271c954.js.map} +1 -1
- package/cjs/{Icon-95ea0e53.js → Icon-f77b5d53.js} +11 -11
- package/cjs/{Icon-95ea0e53.js.map → Icon-f77b5d53.js.map} +1 -1
- package/cjs/{Indexer-e9f810de.js → Indexer-e1fbb014.js} +16 -16
- package/cjs/{Indexer-e9f810de.js.map → Indexer-e1fbb014.js.map} +1 -1
- package/cjs/{InlineHelpSource-dcd9c8c8.js → InlineHelpSource-fc2946df.js} +3 -3
- package/cjs/{InlineHelpSource-dcd9c8c8.js.map → InlineHelpSource-fc2946df.js.map} +1 -1
- package/cjs/{Link-235756e5.js → Link-57700fe7.js} +8 -8
- package/cjs/{Link-235756e5.js.map → Link-57700fe7.js.map} +1 -1
- package/cjs/{List-865d6221.js → List-ddb9f837.js} +23 -23
- package/cjs/{List-865d6221.js.map → List-ddb9f837.js.map} +1 -1
- package/cjs/{ListItemTextLayout-392eb227.js → ListItemTextLayout-093ad65f.js} +13 -13
- package/cjs/{ListItemTextLayout-392eb227.js.map → ListItemTextLayout-093ad65f.js.map} +1 -1
- package/cjs/{ListView-c00dfc4e.js → ListView-25710e8a.js} +3 -3
- package/cjs/{ListView-c00dfc4e.js.map → ListView-25710e8a.js.map} +1 -1
- package/cjs/{LoadMoreCollection-5092e58d.js → LoadMoreCollection-9dd85521.js} +3 -3
- package/cjs/{LoadMoreCollection-5092e58d.js.map → LoadMoreCollection-9dd85521.js.map} +1 -1
- package/cjs/{Menu-2559a0b2.js → Menu-36bab901.js} +16 -16
- package/cjs/{Menu-2559a0b2.js.map → Menu-36bab901.js.map} +1 -1
- package/cjs/{MenuDivider-6b694520.js → MenuDivider-39c78cbf.js} +4 -4
- package/cjs/{MenuDivider-6b694520.js.map → MenuDivider-39c78cbf.js.map} +1 -1
- package/cjs/{MenuItem-c8023341.js → MenuItem-62f058a4.js} +19 -19
- package/cjs/{MenuItem-c8023341.js.map → MenuItem-62f058a4.js.map} +1 -1
- package/cjs/{Message.types-611ea674.js → Message.types-88e73145.js} +2 -2
- package/cjs/{Message.types-611ea674.js.map → Message.types-88e73145.js.map} +1 -1
- package/cjs/{MessageCloseButton-91419edb.js → MessageCloseButton-b8cfcc43.js} +9 -9
- package/cjs/{MessageCloseButton-91419edb.js.map → MessageCloseButton-b8cfcc43.js.map} +1 -1
- package/cjs/{MessageDetail-197338d7.js → MessageDetail-051f9e6b.js} +7 -7
- package/cjs/{MessageDetail-197338d7.js.map → MessageDetail-051f9e6b.js.map} +1 -1
- package/cjs/{MessageFormattingUtils-8e89d508.js → MessageFormattingUtils-1ef9baec.js} +4 -4
- package/cjs/{MessageFormattingUtils-8e89d508.js.map → MessageFormattingUtils-1ef9baec.js.map} +1 -1
- package/cjs/{MessageLayer-3b89c815.js → MessageLayer-08db41db.js} +11 -11
- package/cjs/{MessageLayer-3b89c815.js.map → MessageLayer-08db41db.js.map} +1 -1
- package/cjs/{MessageStartIcon-94b702ff.js → MessageStartIcon-f236c25f.js} +11 -11
- package/cjs/{MessageStartIcon-94b702ff.js.map → MessageStartIcon-f236c25f.js.map} +1 -1
- package/cjs/{MessageSummary-121a7665.js → MessageSummary-9e2dce96.js} +7 -7
- package/cjs/{MessageSummary-121a7665.js.map → MessageSummary-9e2dce96.js.map} +1 -1
- package/cjs/{MessageTimestamp-b3fddcc0.js → MessageTimestamp-7987b6f0.js} +5 -5
- package/cjs/{MessageTimestamp-b3fddcc0.js.map → MessageTimestamp-7987b6f0.js.map} +1 -1
- package/cjs/{MessageToast-91261767.js → MessageToast-d3d40483.js} +9 -9
- package/cjs/{MessageToast-91261767.js.map → MessageToast-d3d40483.js.map} +1 -1
- package/cjs/{MessageUtils-ad3d83e8.js → MessageUtils-12584d30.js} +3 -3
- package/cjs/{MessageUtils-ad3d83e8.js.map → MessageUtils-12584d30.js.map} +1 -1
- package/cjs/{MessagesManager-c5cf35f8.js → MessagesManager-bb084f2a.js} +4 -4
- package/cjs/{MessagesManager-c5cf35f8.js.map → MessagesManager-bb084f2a.js.map} +1 -1
- package/cjs/{MeterCircle-858a9094.js → MeterCircle-b126c12c.js} +50 -50
- package/cjs/{MeterCircle-858a9094.js.map → MeterCircle-b126c12c.js.map} +1 -1
- package/cjs/{Modal-f80212da.js → Modal-6824a496.js} +7 -7
- package/cjs/{Modal-f80212da.js.map → Modal-6824a496.js.map} +1 -1
- package/cjs/{NumberInputText-10d0e09c.js → NumberInputText-fca5f8d9.js} +7 -7
- package/cjs/{NumberInputText-10d0e09c.js.map → NumberInputText-fca5f8d9.js.map} +1 -1
- package/cjs/PRIVATE_Collection/__tests__/Collection.spec.js +2 -2
- package/cjs/PRIVATE_Collection.js +2 -2
- package/cjs/PRIVATE_List/__tests__/List.spec.js +24 -24
- package/cjs/PRIVATE_List.js +23 -23
- package/cjs/PRIVATE_Message/__tests__/MessageCloseButton.spec.js +17 -17
- package/cjs/PRIVATE_Message/__tests__/MessageDetail.spec.js +6 -6
- package/cjs/PRIVATE_Message/__tests__/MessageFormattingUtils.spec.js +4 -4
- package/cjs/PRIVATE_Message/__tests__/MessageStartIcon.spec.js +19 -19
- package/cjs/PRIVATE_Message/__tests__/MessageSummary.spec.js +3 -3
- package/cjs/PRIVATE_Message/__tests__/MessageTimestamp.spec.js +6 -6
- package/cjs/PRIVATE_Message/__tests__/MessageUtils.spec.js +7 -7
- package/cjs/PRIVATE_Message/__tests__/MessagesManager.spec.js +4 -4
- package/cjs/PRIVATE_Message.js +41 -41
- package/cjs/PRIVATE_Message.js.map +1 -1
- package/cjs/PRIVATE_MessageLayer/__tests__/MessageLayer.spec.js +12 -12
- package/cjs/PRIVATE_MessageLayer.js +12 -12
- package/cjs/PRIVATE_Meter.js +2 -2
- package/cjs/PRIVATE_SelectCommon.js +54 -54
- package/cjs/PRIVATE_SelectCommon.js.map +1 -1
- package/cjs/PRIVATE_TransitionGroup.js +1 -1
- package/cjs/PRIVATE_VirtualizedCollection/__tests__/VirtualizedCollection.spec.js +3 -3
- package/cjs/PRIVATE_VirtualizedCollection.js +3 -3
- package/cjs/{ReadonlyTextFieldInput-1fe8a8c7.js → ReadonlyTextFieldInput-48131d00.js} +13 -13
- package/cjs/{ReadonlyTextFieldInput-1fe8a8c7.js.map → ReadonlyTextFieldInput-48131d00.js.map} +1 -1
- package/cjs/{SelectMenuItem-e323972a.js → SelectMenuItem-56b08b29.js} +5 -5
- package/cjs/{SelectMenuItem-e323972a.js.map → SelectMenuItem-56b08b29.js.map} +1 -1
- package/cjs/{SelectMultiple-5a403f5c.js → SelectMultiple-02df1d0a.js} +8 -8
- package/cjs/{SelectMultiple-5a403f5c.js.map → SelectMultiple-02df1d0a.js.map} +1 -1
- package/cjs/{SelectSingle-94c24387.js → SelectSingle-2cf76a61.js} +4 -4
- package/cjs/{SelectSingle-94c24387.js.map → SelectSingle-2cf76a61.js.map} +1 -1
- package/cjs/{Skeleton-8d2cfece.js → Skeleton-278525b6.js} +5 -5
- package/cjs/{Skeleton-8d2cfece.js.map → Skeleton-278525b6.js.map} +1 -1
- package/cjs/{Spacer-cd18b349.js → Spacer-1aebb745.js} +4 -4
- package/cjs/{Spacer-cd18b349.js.map → Spacer-1aebb745.js.map} +1 -1
- package/cjs/{SplitMenuButton-881945ad.js → SplitMenuButton-37da4d36.js} +14 -14
- package/cjs/{SplitMenuButton-881945ad.js.map → SplitMenuButton-37da4d36.js.map} +1 -1
- package/cjs/{Subheading-a41fb88e.js → Subheading-2f651b4f.js} +11 -11
- package/cjs/{Subheading-a41fb88e.js.map → Subheading-2f651b4f.js.map} +1 -1
- package/cjs/{Text-6a8f1ecc.js → Text-86fe82ec.js} +28 -28
- package/cjs/{Text-6a8f1ecc.js.map → Text-86fe82ec.js.map} +1 -1
- package/cjs/{TextArea-96bc5e5e.js → TextArea-caf5f43c.js} +8 -8
- package/cjs/{TextArea-96bc5e5e.js.map → TextArea-caf5f43c.js.map} +1 -1
- package/cjs/{TextAreaAutosize-ba9b3a21.js → TextAreaAutosize-b0412c32.js} +5 -5
- package/cjs/{TextAreaAutosize-ba9b3a21.js.map → TextAreaAutosize-b0412c32.js.map} +1 -1
- package/cjs/{TextFieldInput-16c69441.js → TextFieldInput-f51a6d2e.js} +33 -33
- package/cjs/{TextFieldInput-16c69441.js.map → TextFieldInput-f51a6d2e.js.map} +1 -1
- package/cjs/UNSAFE_AspectRatio.js +8 -8
- package/cjs/UNSAFE_Avatar/__tests__/Avatar.spec.js +3 -3
- package/cjs/UNSAFE_Avatar.js +11 -11
- package/cjs/UNSAFE_Avatar.js.map +1 -1
- package/cjs/UNSAFE_Badge/__tests__/Badge.spec.js +3 -3
- package/cjs/UNSAFE_Badge.js +3 -3
- package/cjs/UNSAFE_BaseButton/__tests__/BaseButton.spec.js +9 -9
- package/cjs/UNSAFE_BaseButton.js +9 -9
- package/cjs/UNSAFE_Button/__tests__/Button.spec.js +10 -10
- package/cjs/UNSAFE_Button.js +10 -10
- package/cjs/UNSAFE_Center.js +11 -11
- package/cjs/UNSAFE_Chip/__tests__/Chip.spec.js +3 -3
- package/cjs/UNSAFE_Chip.js +3 -3
- package/cjs/UNSAFE_Collapsible.js +26 -26
- package/cjs/UNSAFE_Collapsible.js.map +1 -1
- package/cjs/UNSAFE_Collection.js +1 -1
- package/cjs/UNSAFE_ComponentMessage/__tests__/ComponentMessage.spec.js +32 -32
- package/cjs/UNSAFE_ComponentMessage/__tests__/ComponentMessageContainer.spec.js +33 -33
- package/cjs/UNSAFE_ComponentMessage.js +33 -33
- package/cjs/UNSAFE_Divider/__tests__/Divider.spec.js +7 -7
- package/cjs/UNSAFE_Divider.js +7 -7
- package/cjs/UNSAFE_EmptyList.js +1 -1
- package/cjs/UNSAFE_Environment/__tests__/Environment.spec.js +1 -1
- package/cjs/UNSAFE_Environment.js +1 -1
- package/cjs/UNSAFE_FilePicker/__tests__/FilePicker.spec.js +14 -14
- package/cjs/UNSAFE_FilePicker.js +14 -14
- package/cjs/UNSAFE_Flex/__tests__/Flex.spec.js +11 -11
- package/cjs/UNSAFE_Flex.js +11 -11
- package/cjs/UNSAFE_Floating/__tests__/Floating.spec.js +3 -3
- package/cjs/UNSAFE_Floating.js +3 -3
- package/cjs/UNSAFE_FocusTrap/__tests__/FocusTrap.spec.js +6 -6
- package/cjs/UNSAFE_FocusTrap.js +6 -6
- package/cjs/UNSAFE_Grid.js +9 -9
- package/cjs/UNSAFE_Heading/__test__/Heading.spec.js +11 -11
- package/cjs/UNSAFE_Heading.js +9 -9
- package/cjs/UNSAFE_HiddenAccessible/__tests__/HiddenAccessible.spec.js +12 -12
- package/cjs/UNSAFE_HiddenAccessible.js +2 -2
- package/cjs/UNSAFE_HighlightText/__tests__/HighlightText.spec.js +2 -2
- package/cjs/UNSAFE_HighlightText.js +2 -2
- package/cjs/UNSAFE_Icon/__tests__/Icon.spec.js +8 -8
- package/cjs/UNSAFE_Icon/__tests__/Icons.spec.js +9 -9
- package/cjs/UNSAFE_Icon.js +7 -7
- package/cjs/UNSAFE_Icons.js +8 -8
- package/cjs/UNSAFE_Indexer/__tests__/Indexer.spec.js +16 -16
- package/cjs/UNSAFE_Indexer.js +16 -16
- package/cjs/UNSAFE_InputPassword/__tests__/InputPassword.spec.js +39 -39
- package/cjs/UNSAFE_InputPassword.js +40 -40
- package/cjs/UNSAFE_InputText.js +39 -39
- package/cjs/UNSAFE_Label.js +16 -16
- package/cjs/UNSAFE_Label.js.map +1 -1
- package/cjs/UNSAFE_LabelValueLayout.js +20 -20
- package/cjs/UNSAFE_LabelValueLayout.js.map +1 -1
- package/cjs/UNSAFE_Layer.js +1 -1
- package/cjs/UNSAFE_Link/__tests__/Link.spec.js +3 -3
- package/cjs/UNSAFE_Link.js +3 -3
- package/cjs/UNSAFE_ListItemLayout/__tests__/ListItemLayout.spec.js +10 -10
- package/cjs/UNSAFE_ListItemLayout.js +10 -10
- package/cjs/UNSAFE_ListView/__tests__/ListView.spec.js +27 -27
- package/cjs/UNSAFE_ListView/__tests__/ListViewTabbableMode.spec.js +27 -27
- package/cjs/UNSAFE_ListView.js +24 -24
- package/cjs/UNSAFE_LiveRegion.js +2 -2
- package/cjs/UNSAFE_LiveRegion.js.map +1 -1
- package/cjs/UNSAFE_LoadMoreCollection/__tests__/LoadMoreCollection.spec.js +3 -3
- package/cjs/UNSAFE_LoadMoreCollection.js +3 -3
- package/cjs/UNSAFE_Menu/__tests__/Menu.spec.js +19 -19
- package/cjs/UNSAFE_Menu/__tests__/MenuItem.spec.js +11 -11
- package/cjs/UNSAFE_Menu/__tests__/SelectMenuItem.spec.js +18 -18
- package/cjs/UNSAFE_Menu/__tests__/SelectMultipleMenuGroup.spec.js +22 -22
- package/cjs/UNSAFE_Menu/__tests__/SelectSingleMenuGroup.spec.js +22 -22
- package/cjs/UNSAFE_Menu.js +16 -16
- package/cjs/UNSAFE_MessageBanner.js +30 -30
- package/cjs/UNSAFE_MessageToast/__tests__/MessageToast.spec.js +33 -33
- package/cjs/UNSAFE_MessageToast.js +33 -33
- package/cjs/UNSAFE_MeterBar/__tests__/MeterBar.spec.js +7 -7
- package/cjs/UNSAFE_MeterBar.js +50 -50
- package/cjs/UNSAFE_MeterBar.js.map +1 -1
- package/cjs/UNSAFE_MeterCircle/__tests__/MeterCircle.spec.js +8 -8
- package/cjs/UNSAFE_MeterCircle.js +7 -7
- package/cjs/UNSAFE_Modal/__tests__/Modal.spec.js +8 -8
- package/cjs/UNSAFE_Modal.js +8 -8
- package/cjs/UNSAFE_NumberInputText/__tests__/NumberInputText.spec.js +39 -39
- package/cjs/UNSAFE_NumberInputText.js +39 -39
- package/cjs/UNSAFE_PrefixSuffix.js +10 -10
- package/cjs/UNSAFE_PrefixSuffix.js.map +1 -1
- package/cjs/UNSAFE_ProgressBar/__tests__/ProgressBar.spec.js +3 -3
- package/cjs/UNSAFE_ProgressBar.js +9 -9
- package/cjs/UNSAFE_ProgressBar.js.map +1 -1
- package/cjs/UNSAFE_ProgressCircle/__tests__/ProgressCircle.spec.js +3 -3
- package/cjs/UNSAFE_ProgressCircle.js +9 -9
- package/cjs/UNSAFE_ProgressCircle.js.map +1 -1
- package/cjs/UNSAFE_RatingGauge/__tests__/RatingGauge.spec.js +7 -7
- package/cjs/UNSAFE_RatingGauge.js +26 -26
- package/cjs/UNSAFE_RatingGauge.js.map +1 -1
- package/cjs/UNSAFE_SelectMultiple/__tests__/SelectMultiple.spec.js +47 -47
- package/cjs/UNSAFE_SelectMultiple.js +47 -47
- package/cjs/UNSAFE_SelectSingle/__tests__/SelectSingle.spec.js +46 -46
- package/cjs/UNSAFE_SelectSingle.js +46 -46
- package/cjs/UNSAFE_Selector.js +22 -22
- package/cjs/UNSAFE_Selector.js.map +1 -1
- package/cjs/UNSAFE_Skeleton/__tests__/Skeleton.spec.js +8 -8
- package/cjs/UNSAFE_Skeleton.js +8 -8
- package/cjs/UNSAFE_Spacer/__tests__/Spacer.spec.js +10 -10
- package/cjs/UNSAFE_Spacer.js +10 -10
- package/cjs/UNSAFE_SplitMenuButton/__tests__/SplitMenuButton.spec.js +23 -23
- package/cjs/UNSAFE_SplitMenuButton.js +23 -23
- package/cjs/UNSAFE_Subheading/__test__/Subheading.spec.js +10 -10
- package/cjs/UNSAFE_Subheading.js +8 -8
- package/cjs/UNSAFE_Text/__tests__/Text.spec.js +8 -8
- package/cjs/UNSAFE_Text.js +8 -8
- package/cjs/UNSAFE_TextArea/__tests__/TextArea.spec.js +39 -39
- package/cjs/UNSAFE_TextArea.js +39 -39
- package/cjs/UNSAFE_TextAreaAutosize/__tests__/TextAreaAutosize.spec.js +40 -40
- package/cjs/UNSAFE_TextAreaAutosize.js +40 -40
- package/cjs/UNSAFE_TextField/__tests__/ReadonlyTextFieldInput.spec.js +10 -10
- package/cjs/UNSAFE_TextField/__tests__/TextFieldInput.spec.js +11 -11
- package/cjs/UNSAFE_TextField.js +35 -35
- package/cjs/UNSAFE_TextField.js.map +1 -1
- package/cjs/UNSAFE_ThemedIcons.js +9 -9
- package/cjs/UNSAFE_UserAssistance/__tests__/InlineHelpSource.spec.js +2 -2
- package/cjs/UNSAFE_UserAssistance.js +41 -41
- package/cjs/UNSAFE_UserAssistance.js.map +1 -1
- package/cjs/UNSAFE_View/__tests__/View.spec.js +9 -9
- package/cjs/UNSAFE_View.js +9 -9
- package/cjs/UNSAFE_VirtualizedListView/__tests__/VirtualizedListView.spec.js +27 -27
- package/cjs/UNSAFE_VirtualizedListView/__tests__/VirtualizedListViewTabbableMode.spec.js +27 -27
- package/cjs/UNSAFE_VirtualizedListView.js +24 -24
- package/cjs/UNSAFE_WindowOverlay.js +1 -1
- package/cjs/{VirtualizedCollection-98eb94b8.js → VirtualizedCollection-ea10af99.js} +3 -3
- package/cjs/{VirtualizedCollection-98eb94b8.js.map → VirtualizedCollection-ea10af99.js.map} +1 -1
- package/cjs/{VirtualizedListView-3214cbca.js → VirtualizedListView-b4f52c34.js} +3 -3
- package/cjs/{VirtualizedListView-3214cbca.js.map → VirtualizedListView-b4f52c34.js.map} +1 -1
- package/cjs/__tests__/FormControls/FormControlAria.spec.js +52 -52
- package/cjs/__tests__/FormControls/FormControlClearIcon.spec.js +39 -39
- package/cjs/__tests__/FormControls/FormControlCommit.spec.js +42 -42
- package/cjs/__tests__/FormControls/FormControlPrefixSuffix.spec.js +40 -40
- package/cjs/{_curry1-92f728e8.js → _curry1-bceac0f2.js} +2 -2
- package/cjs/{_curry1-92f728e8.js.map → _curry1-bceac0f2.js.map} +1 -1
- package/cjs/{_curry2-a3a9dc87.js → _curry2-18da4e88.js} +3 -3
- package/cjs/{_curry2-a3a9dc87.js.map → _curry2-18da4e88.js.map} +1 -1
- package/cjs/{_curry3-1b9a049f.js → _curry3-3d4a2b8d.js} +4 -4
- package/cjs/{_curry3-1b9a049f.js.map → _curry3-3d4a2b8d.js.map} +1 -1
- package/cjs/{_has-be98f312.js → _has-dd5fd96c.js} +3 -3
- package/cjs/{_has-be98f312.js.map → _has-dd5fd96c.js.map} +1 -1
- package/cjs/{classNames-aad02aff.js → classNames-052c746b.js} +2 -2
- package/cjs/{classNames-aad02aff.js.map → classNames-052c746b.js.map} +1 -1
- package/cjs/{clientHints-304675d3.js → clientHints-6977f4ad.js} +4 -5
- package/cjs/clientHints-6977f4ad.js.map +1 -0
- package/cjs/{flexbox-28fb45b7.js → flexbox-c91a5edc.js} +10 -10
- package/cjs/{flexbox-28fb45b7.js.map → flexbox-c91a5edc.js.map} +1 -1
- package/cjs/{flexitem-72653edf.js → flexitem-6647e291.js} +10 -10
- package/cjs/{flexitem-72653edf.js.map → flexitem-6647e291.js.map} +1 -1
- package/cjs/hooks/PRIVATE_useCollectionFocusRing.js +1 -1
- package/cjs/hooks/PRIVATE_useCurrentKey.js +1 -1
- package/cjs/hooks/PRIVATE_useDvtMeterEvents.js +6 -6
- package/cjs/hooks/PRIVATE_useItemAction.js +1 -1
- package/cjs/hooks/PRIVATE_useMessagesFocusManager.js +1 -1
- package/cjs/hooks/PRIVATE_useSelection.js +1 -1
- package/cjs/hooks/PRIVATE_useSingleSelection.js +2 -2
- package/cjs/hooks/PRIVATE_useTabbableModeSet.js +1 -1
- package/cjs/hooks/UNSAFE_useActionable.js +1 -1
- package/cjs/hooks/UNSAFE_useActive.js +1 -1
- package/cjs/hooks/UNSAFE_useAnimation/__tests__/useAnimation.spec.js +3 -3
- package/cjs/hooks/UNSAFE_useAnimation.js +3 -3
- package/cjs/hooks/UNSAFE_useBreakpointValues.js +1 -1
- package/cjs/hooks/UNSAFE_useBreakpoints.js +1 -1
- package/cjs/hooks/UNSAFE_useClearIcon.js +1 -1
- package/cjs/hooks/UNSAFE_useColorScheme.js +1 -1
- package/cjs/hooks/UNSAFE_useContainerBreakpointValues.js +1 -1
- package/cjs/hooks/UNSAFE_useContainerBreakpoints.js +1 -1
- package/cjs/hooks/UNSAFE_useCurrentValueReducer.js +1 -1
- package/cjs/hooks/UNSAFE_useDebounce.js +1 -1
- package/cjs/hooks/UNSAFE_useFloating.js +2 -2
- package/cjs/hooks/UNSAFE_useFocus.js +1 -1
- package/cjs/hooks/UNSAFE_useFocusWithin/__tests__/useFocusWithin.spec.js +2 -2
- package/cjs/hooks/UNSAFE_useFocusWithin.js +2 -2
- package/cjs/hooks/UNSAFE_useFocusableTextField.js +3 -3
- package/cjs/hooks/UNSAFE_useFormContext.js +1 -1
- package/cjs/hooks/UNSAFE_useFormFieldContext.js +1 -1
- package/cjs/hooks/UNSAFE_useFormVariantContext.js +1 -1
- package/cjs/hooks/UNSAFE_useHover.js +1 -1
- package/cjs/hooks/UNSAFE_useId.js +1 -1
- package/cjs/hooks/UNSAFE_useLengthFilter.js +1 -1
- package/cjs/hooks/UNSAFE_useLoadingIndicatorTimer.js +1 -1
- package/cjs/hooks/UNSAFE_useLongPress.js +1 -1
- package/cjs/hooks/UNSAFE_useMessagesContext.js +1 -1
- package/cjs/hooks/UNSAFE_useOutsideClick.js +1 -1
- package/cjs/hooks/UNSAFE_usePan.js +1 -1
- package/cjs/hooks/UNSAFE_usePrefixSuffix.js +2 -2
- package/cjs/hooks/UNSAFE_usePress.js +1 -1
- package/cjs/hooks/UNSAFE_useScale.js +1 -1
- package/cjs/hooks/UNSAFE_useSwipe.js +1 -1
- package/cjs/hooks/UNSAFE_useTabbableMode.js +1 -1
- package/cjs/hooks/UNSAFE_useTap.js +1 -1
- package/cjs/hooks/UNSAFE_useTextField.js +1 -1
- package/cjs/hooks/UNSAFE_useTextFieldInputHandlers.js +2 -2
- package/cjs/hooks/UNSAFE_useTheme.js +1 -1
- package/cjs/hooks/UNSAFE_useTimer.js +1 -1
- package/cjs/hooks/UNSAFE_useToggle.js +1 -1
- package/cjs/hooks/UNSAFE_useTooltip.js +10 -10
- package/cjs/hooks/UNSAFE_useTooltip.js.map +1 -1
- package/cjs/hooks/UNSAFE_useTouch.js +1 -1
- package/cjs/hooks/UNSAFE_useTranslationBundle.js +1 -1
- package/cjs/hooks/UNSAFE_useUncontrolledState.js +1 -1
- package/cjs/hooks/UNSAFE_useUser.js +1 -1
- package/cjs/hooks/UNSAFE_useViewportIntersect.js +1 -1
- package/cjs/{index-3f8d5bb1.js → index-0f15ab4a.js} +2 -2
- package/cjs/{index-3f8d5bb1.js.map → index-0f15ab4a.js.map} +1 -1
- package/cjs/{index-1f7c328e.js → index-9db39f31.js} +3 -3
- package/cjs/{index-1f7c328e.js.map → index-9db39f31.js.map} +1 -1
- package/cjs/{index-d65f7e75.js → index-f00e5f39.js} +3 -3
- package/cjs/{index-d65f7e75.js.map → index-f00e5f39.js.map} +1 -1
- package/cjs/{keys-37f64206.js → keys-851fe6d1.js} +4 -4
- package/cjs/{keys-37f64206.js.map → keys-851fe6d1.js.map} +1 -1
- package/cjs/{listViewSelectionTests-d4b27c65.js → listViewSelectionTests-4c33f5af.js} +4 -4
- package/cjs/{listViewSelectionTests-d4b27c65.js.map → listViewSelectionTests-4c33f5af.js.map} +1 -1
- package/cjs/{listViewTabbableModeTests-78640dbe.js → listViewTabbableModeTests-22a486b8.js} +4 -4
- package/cjs/{listViewTabbableModeTests-78640dbe.js.map → listViewTabbableModeTests-22a486b8.js.map} +1 -1
- package/cjs/{listViewTestFixtures-be920c78.js → listViewTestFixtures-082a5a11.js} +2 -2
- package/cjs/{listViewTestFixtures-be920c78.js.map → listViewTestFixtures-082a5a11.js.map} +1 -1
- package/cjs/{menuTestsUtils-6a2d46c9.js → menuTestsUtils-134641c1.js} +2 -2
- package/cjs/{menuTestsUtils-6a2d46c9.js.map → menuTestsUtils-134641c1.js.map} +1 -1
- package/cjs/resources/nls/ar/bundle.js +1 -1
- package/cjs/resources/nls/ar-XB/bundle.js +1 -1
- package/cjs/resources/nls/bg/bundle.js +1 -1
- package/cjs/resources/nls/bs/bundle.js +1 -1
- package/cjs/resources/nls/bs-Cyrl/bundle.js +1 -1
- package/cjs/resources/nls/bundle.js +1 -1
- package/cjs/resources/nls/cs/bundle.js +1 -1
- package/cjs/resources/nls/da/bundle.js +1 -1
- package/cjs/resources/nls/de/bundle.js +1 -1
- package/cjs/resources/nls/el/bundle.js +1 -1
- package/cjs/resources/nls/en/bundle.js +1 -1
- package/cjs/resources/nls/en-XA/bundle.js +1 -1
- package/cjs/resources/nls/en-XC/bundle.js +1 -1
- package/cjs/resources/nls/es/bundle.js +1 -1
- package/cjs/resources/nls/et/bundle.js +1 -1
- package/cjs/resources/nls/fi/bundle.js +1 -1
- package/cjs/resources/nls/fr/bundle.js +1 -1
- package/cjs/resources/nls/fr-CA/bundle.js +1 -1
- package/cjs/resources/nls/he/bundle.js +1 -1
- package/cjs/resources/nls/hr/bundle.js +1 -1
- package/cjs/resources/nls/hu/bundle.js +1 -1
- package/cjs/resources/nls/is/bundle.js +1 -1
- package/cjs/resources/nls/it/bundle.js +1 -1
- package/cjs/resources/nls/ja/bundle.js +1 -1
- package/cjs/resources/nls/ko/bundle.js +1 -1
- package/cjs/resources/nls/lt/bundle.js +1 -1
- package/cjs/resources/nls/lv/bundle.js +1 -1
- package/cjs/resources/nls/ms/bundle.js +1 -1
- package/cjs/resources/nls/nl/bundle.js +1 -1
- package/cjs/resources/nls/no/bundle.js +1 -1
- package/cjs/resources/nls/pl/bundle.js +1 -1
- package/cjs/resources/nls/pt/bundle.js +1 -1
- package/cjs/resources/nls/pt-PT/bundle.js +1 -1
- package/cjs/resources/nls/ro/bundle.js +1 -1
- package/cjs/resources/nls/ru/bundle.js +1 -1
- package/cjs/resources/nls/sk/bundle.js +1 -1
- package/cjs/resources/nls/sl/bundle.js +1 -1
- package/cjs/resources/nls/sr/bundle.js +1 -1
- package/cjs/resources/nls/sr-Latn/bundle.js +1 -1
- package/cjs/resources/nls/supportedLocales.js +1 -1
- package/cjs/resources/nls/sv/bundle.js +1 -1
- package/cjs/resources/nls/th/bundle.js +1 -1
- package/cjs/resources/nls/tr/bundle.js +1 -1
- package/cjs/resources/nls/uk/bundle.js +1 -1
- package/cjs/resources/nls/vi/bundle.js +1 -1
- package/cjs/resources/nls/zh-Hans/bundle.js +1 -1
- package/cjs/resources/nls/zh-Hant/bundle.js +1 -1
- package/cjs/{stringUtils-3a14a8ae.js → stringUtils-fdad69c1.js} +2 -2
- package/cjs/{stringUtils-3a14a8ae.js.map → stringUtils-fdad69c1.js.map} +1 -1
- package/cjs/{testHelpers-d82fa365.js → testHelpers-654f36bc.js} +2 -2
- package/cjs/{testHelpers-d82fa365.js.map → testHelpers-654f36bc.js.map} +1 -1
- package/cjs/translationBundle/__tests__/translationBundle.spec.js +1 -1
- package/cjs/translationBundle.js +1 -1
- package/cjs/{tslib.es6-cc468494.js → tslib.es6-48af5935.js} +2 -2
- package/cjs/{tslib.es6-cc468494.js.map → tslib.es6-48af5935.js.map} +1 -1
- package/cjs/{useAnimation-0d01f108.js → useAnimation-fb9e984c.js} +3 -3
- package/cjs/{useAnimation-0d01f108.js.map → useAnimation-fb9e984c.js.map} +1 -1
- package/cjs/{useFocusWithin-5d288535.js → useFocusWithin-5168c639.js} +2 -2
- package/cjs/{useFocusWithin-5d288535.js.map → useFocusWithin-5168c639.js.map} +1 -1
- package/cjs/{useModal-6b58468c.js → useModal-ada56bbe.js} +2 -2
- package/cjs/{useModal-6b58468c.js.map → useModal-ada56bbe.js.map} +1 -1
- package/cjs/{useSingleSelection-1cf3868b.js → useSingleSelection-b784682e.js} +2 -2
- package/cjs/{useSingleSelection-1cf3868b.js.map → useSingleSelection-b784682e.js.map} +1 -1
- package/cjs/utils/PRIVATE_clientHints/__tests__/clientHints.spec.js +2 -2
- package/cjs/utils/PRIVATE_clientHints.js +2 -2
- package/cjs/utils/PRIVATE_collectionUtils.js +1 -1
- package/cjs/utils/PRIVATE_dvtTestUtils.js +1 -1
- package/cjs/utils/PRIVATE_floatingUtils.js +1 -1
- package/cjs/utils/PRIVATE_meterUtils.js +1 -1
- package/cjs/utils/PRIVATE_refUtils.js +1 -1
- package/cjs/utils/PRIVATE_tabbableUtils.js +4 -4
- package/cjs/utils/PRIVATE_timer.js +1 -1
- package/cjs/utils/UNSAFE_arrayUtils.js +1 -1
- package/cjs/utils/UNSAFE_attributeUtils.js +1 -1
- package/cjs/utils/UNSAFE_classNames/classNames.spec.js +2 -2
- package/cjs/utils/UNSAFE_classNames.js +2 -2
- package/cjs/utils/UNSAFE_componentUtils.js +1 -1
- package/cjs/utils/UNSAFE_dataProvider.js +1 -1
- package/cjs/utils/UNSAFE_dvtCommonUtils.js +1 -1
- package/cjs/utils/UNSAFE_filePickerUtils.js +1 -1
- package/cjs/utils/UNSAFE_getLocale.js +1 -1
- package/cjs/utils/UNSAFE_interpolations/aria.js +1 -1
- package/cjs/utils/UNSAFE_interpolations/borders.js +1 -1
- package/cjs/utils/UNSAFE_interpolations/boxalignment.js +19 -19
- package/cjs/utils/UNSAFE_interpolations/boxalignment.js.map +1 -1
- package/cjs/utils/UNSAFE_interpolations/colors.js +1 -1
- package/cjs/utils/UNSAFE_interpolations/dimensions.js +2 -2
- package/cjs/utils/UNSAFE_interpolations/flexbox/flexbox.spec.js +5 -5
- package/cjs/utils/UNSAFE_interpolations/flexbox.js +5 -5
- package/cjs/utils/UNSAFE_interpolations/flexitem/flexitem.spec.js +5 -5
- package/cjs/utils/UNSAFE_interpolations/flexitem.js +5 -5
- package/cjs/utils/UNSAFE_interpolations/grid.js +1 -1
- package/cjs/utils/UNSAFE_interpolations/griditem.js +1 -1
- package/cjs/utils/UNSAFE_interpolations/padding.js +1 -1
- package/cjs/utils/UNSAFE_interpolations/text.js +7 -7
- package/cjs/utils/UNSAFE_keys.js +1 -1
- package/cjs/utils/UNSAFE_lengthFilter.js +1 -1
- package/cjs/utils/UNSAFE_logger.js +3 -3
- package/cjs/utils/UNSAFE_matchTranslationBundle.js +1 -1
- package/cjs/utils/UNSAFE_mergeInterpolations.js +6 -6
- package/cjs/utils/UNSAFE_mergeProps.js +1 -1
- package/cjs/utils/UNSAFE_meterTypes.js +1 -1
- package/cjs/utils/UNSAFE_roles.js +1 -1
- package/cjs/utils/UNSAFE_selectUtils.js +1 -1
- package/cjs/utils/UNSAFE_size.js +1 -1
- package/cjs/utils/UNSAFE_soundUtils.js +1 -1
- package/cjs/utils/UNSAFE_stringUtils/stringUtils.spec.js +2 -2
- package/cjs/utils/UNSAFE_stringUtils.js +2 -2
- package/cjs/utils/UNSAFE_typeUtils.js +1 -1
- package/cjs/utils/UNSAFE_units.js +2 -2
- package/cjs/utils/UNSAFE_valueUpdateDetail.js +1 -1
- package/es/{ClearIcon-65b94e3e.js → ClearIcon-f7b67a33.js} +3 -3
- package/es/{ClearIcon-65b94e3e.js.map → ClearIcon-f7b67a33.js.map} +1 -1
- package/es/{LoadMoreCollection-ae0cfa2a.js → LoadMoreCollection-2bdf656d.js} +2 -2
- package/es/{LoadMoreCollection-ae0cfa2a.js.map → LoadMoreCollection-2bdf656d.js.map} +1 -1
- package/es/PRIVATE_Collection.js +1 -1
- package/es/PRIVATE_List.css +15 -15
- package/es/PRIVATE_List.js +24 -24
- package/es/PRIVATE_List.js.map +1 -1
- package/es/PRIVATE_Message.css +27 -27
- package/es/PRIVATE_Message.js +35 -35
- package/es/PRIVATE_Message.js.map +1 -1
- package/es/PRIVATE_MessageLayer.css +7 -7
- package/es/PRIVATE_MessageLayer.js +14 -14
- package/es/PRIVATE_MessageLayer.js.map +1 -1
- package/es/PRIVATE_Meter.js +2 -2
- package/es/PRIVATE_SelectCommon.css +13 -13
- package/es/PRIVATE_SelectCommon.js +22 -22
- package/es/PRIVATE_SelectCommon.js.map +1 -1
- package/es/PRIVATE_TransitionGroup.js +1 -1
- package/es/PRIVATE_VirtualizedCollection.js +1 -1
- package/es/UNSAFE_AspectRatio.css +1 -1
- package/es/UNSAFE_AspectRatio.js +7 -7
- package/es/UNSAFE_Avatar.css +8 -8
- package/es/UNSAFE_Avatar.js +10 -10
- package/es/UNSAFE_Avatar.js.map +1 -1
- package/es/UNSAFE_Badge.css +13 -13
- package/es/UNSAFE_Badge.js +14 -14
- package/es/UNSAFE_Badge.js.map +1 -1
- package/es/UNSAFE_BaseButton.css +15 -15
- package/es/UNSAFE_BaseButton.js +21 -21
- package/es/UNSAFE_BaseButton.js.map +1 -1
- package/es/UNSAFE_Button.css +7 -7
- package/es/UNSAFE_Button.js +13 -13
- package/es/UNSAFE_Button.js.map +1 -1
- package/es/UNSAFE_Center.js +7 -7
- package/es/UNSAFE_Chip.css +7 -7
- package/es/UNSAFE_Chip.js +8 -8
- package/es/UNSAFE_Chip.js.map +1 -1
- package/es/UNSAFE_Collapsible.css +8 -8
- package/es/UNSAFE_Collapsible.js +16 -16
- package/es/UNSAFE_Collapsible.js.map +1 -1
- package/es/UNSAFE_Collection.js +1 -1
- package/es/UNSAFE_ComponentMessage.css +2 -2
- package/es/UNSAFE_ComponentMessage.js +10 -10
- package/es/UNSAFE_ComponentMessage.js.map +1 -1
- package/es/UNSAFE_Divider.css +1 -1
- package/es/UNSAFE_Divider.js +6 -6
- package/es/UNSAFE_EmptyList.js +1 -1
- package/es/UNSAFE_Environment.js +1 -1
- package/es/UNSAFE_FilePicker.css +6 -6
- package/es/UNSAFE_FilePicker.js +13 -13
- package/es/UNSAFE_FilePicker.js.map +1 -1
- package/es/UNSAFE_Flex.css +2 -2
- package/es/UNSAFE_Flex.js +9 -9
- package/es/UNSAFE_Flex.js.map +1 -1
- package/es/UNSAFE_Floating.js +2 -2
- package/es/UNSAFE_FocusTrap.css +2 -2
- package/es/UNSAFE_FocusTrap.js +6 -6
- package/es/UNSAFE_Grid.css +1 -1
- package/es/UNSAFE_Grid.js +8 -8
- package/es/UNSAFE_Heading.css +9 -9
- package/es/UNSAFE_Heading.js +16 -16
- package/es/UNSAFE_Heading.js.map +1 -1
- package/es/UNSAFE_HiddenAccessible.css +1 -1
- package/es/UNSAFE_HiddenAccessible.js +2 -2
- package/es/UNSAFE_HiddenAccessible.js.map +1 -1
- package/es/UNSAFE_HighlightText.css +1 -1
- package/es/UNSAFE_HighlightText.js +2 -2
- package/es/UNSAFE_Icon.css +8 -8
- package/es/UNSAFE_Icon.js +11 -11
- package/es/UNSAFE_Icon.js.map +1 -1
- package/es/UNSAFE_Icons.js +3 -3
- package/es/UNSAFE_Indexer.css +7 -7
- package/es/UNSAFE_Indexer.js +15 -15
- package/es/UNSAFE_Indexer.js.map +1 -1
- package/es/UNSAFE_InputPassword.css +1 -1
- package/es/UNSAFE_InputPassword.js +10 -10
- package/es/UNSAFE_InputText.css +1 -1
- package/es/UNSAFE_InputText.js +9 -9
- package/es/UNSAFE_Label.css +13 -13
- package/es/UNSAFE_Label.js +15 -15
- package/es/UNSAFE_Label.js.map +1 -1
- package/es/UNSAFE_LabelValueLayout.css +9 -9
- package/es/UNSAFE_LabelValueLayout.js +16 -16
- package/es/UNSAFE_LabelValueLayout.js.map +1 -1
- package/es/UNSAFE_Layer.js +1 -1
- package/es/UNSAFE_Link.css +5 -5
- package/es/UNSAFE_Link.js +6 -6
- package/es/UNSAFE_Link.js.map +1 -1
- package/es/UNSAFE_ListItemLayout.css +9 -9
- package/es/UNSAFE_ListItemLayout.js +16 -16
- package/es/UNSAFE_ListItemLayout.js.map +1 -1
- package/es/UNSAFE_ListView.js +9 -9
- package/es/UNSAFE_LiveRegion.css +1 -1
- package/es/UNSAFE_LiveRegion.js +2 -2
- package/es/UNSAFE_LiveRegion.js.map +1 -1
- package/es/UNSAFE_LoadMoreCollection.js +2 -2
- package/es/UNSAFE_Menu.css +23 -23
- package/es/UNSAFE_Menu.js +31 -31
- package/es/UNSAFE_Menu.js.map +1 -1
- package/es/UNSAFE_MessageBanner.js +8 -8
- package/es/UNSAFE_MessageToast.css +1 -1
- package/es/UNSAFE_MessageToast.js +9 -9
- package/es/UNSAFE_MeterBar.css +44 -44
- package/es/UNSAFE_MeterBar.js +47 -47
- package/es/UNSAFE_MeterBar.js.map +1 -1
- package/es/UNSAFE_MeterCircle.css +46 -46
- package/es/UNSAFE_MeterCircle.js +49 -49
- package/es/UNSAFE_MeterCircle.js.map +1 -1
- package/es/UNSAFE_Modal.css +3 -3
- package/es/UNSAFE_Modal.js +8 -8
- package/es/UNSAFE_NumberInputText.js +8 -8
- package/es/UNSAFE_PrefixSuffix.css +8 -8
- package/es/UNSAFE_PrefixSuffix.js +9 -9
- package/es/UNSAFE_PrefixSuffix.js.map +1 -1
- package/es/UNSAFE_ProgressBar.css +6 -6
- package/es/UNSAFE_ProgressBar.js +8 -8
- package/es/UNSAFE_ProgressBar.js.map +1 -1
- package/es/UNSAFE_ProgressCircle.css +6 -6
- package/es/UNSAFE_ProgressCircle.js +8 -8
- package/es/UNSAFE_ProgressCircle.js.map +1 -1
- package/es/UNSAFE_RatingGauge.css +20 -20
- package/es/UNSAFE_RatingGauge.js +23 -23
- package/es/UNSAFE_RatingGauge.js.map +1 -1
- package/es/UNSAFE_SelectMultiple.css +1 -1
- package/es/UNSAFE_SelectMultiple.js +10 -10
- package/es/UNSAFE_SelectSingle.js +9 -9
- package/es/UNSAFE_Selector.css +5 -5
- package/es/UNSAFE_Selector.js +13 -13
- package/es/UNSAFE_Selector.js.map +1 -1
- package/es/UNSAFE_Skeleton.css +1 -1
- package/es/UNSAFE_Skeleton.js +7 -7
- package/es/UNSAFE_Spacer.js +7 -7
- package/es/UNSAFE_SplitMenuButton.css +5 -5
- package/es/UNSAFE_SplitMenuButton.js +13 -13
- package/es/UNSAFE_SplitMenuButton.js.map +1 -1
- package/es/UNSAFE_Subheading.css +8 -8
- package/es/UNSAFE_Subheading.js +14 -14
- package/es/UNSAFE_Subheading.js.map +1 -1
- package/es/UNSAFE_Text.css +25 -25
- package/es/UNSAFE_Text.js +31 -31
- package/es/UNSAFE_Text.js.map +1 -1
- package/es/UNSAFE_TextArea.css +3 -3
- package/es/UNSAFE_TextArea.js +11 -11
- package/es/UNSAFE_TextArea.js.map +1 -1
- package/es/UNSAFE_TextAreaAutosize.js +8 -8
- package/es/UNSAFE_TextField.css +58 -58
- package/es/UNSAFE_TextField.js +65 -65
- package/es/UNSAFE_TextField.js.map +1 -1
- package/es/UNSAFE_ThemedIcons.js +3 -3
- package/es/UNSAFE_UserAssistance.css +8 -8
- package/es/UNSAFE_UserAssistance.js +16 -16
- package/es/UNSAFE_UserAssistance.js.map +1 -1
- package/es/UNSAFE_View.js +7 -7
- package/es/UNSAFE_VirtualizedListView.js +9 -9
- package/es/UNSAFE_WindowOverlay.js +1 -1
- package/es/{_curry1-be86fde3.js → _curry1-4002d580.js} +2 -2
- package/es/{_curry1-be86fde3.js.map → _curry1-4002d580.js.map} +1 -1
- package/es/{_curry2-2c3644b9.js → _curry2-ad597af0.js} +3 -3
- package/es/{_curry2-2c3644b9.js.map → _curry2-ad597af0.js.map} +1 -1
- package/es/{_curry3-a06acc85.js → _curry3-a3409375.js} +4 -4
- package/es/{_curry3-a06acc85.js.map → _curry3-a3409375.js.map} +1 -1
- package/es/{_has-ab12001b.js → _has-19e9364e.js} +3 -3
- package/es/{_has-ab12001b.js.map → _has-19e9364e.js.map} +1 -1
- package/es/hooks/PRIVATE_useCollectionFocusRing.js +1 -1
- package/es/hooks/PRIVATE_useCurrentKey.js +1 -1
- package/es/hooks/PRIVATE_useDvtMeterEvents.js +3 -3
- package/es/hooks/PRIVATE_useItemAction.js +1 -1
- package/es/hooks/PRIVATE_useMessagesFocusManager.js +1 -1
- package/es/hooks/PRIVATE_useSelection.js +1 -1
- package/es/hooks/PRIVATE_useSingleSelection.js +2 -2
- package/es/hooks/PRIVATE_useTabbableModeSet.js +1 -1
- package/es/hooks/UNSAFE_useActionable.js +1 -1
- package/es/hooks/UNSAFE_useActive.js +1 -1
- package/es/hooks/UNSAFE_useAnimation.js +2 -2
- package/es/hooks/UNSAFE_useBreakpointValues.js +1 -1
- package/es/hooks/UNSAFE_useBreakpoints.js +1 -1
- package/es/hooks/UNSAFE_useClearIcon.js +1 -1
- package/es/hooks/UNSAFE_useColorScheme.js +1 -1
- package/es/hooks/UNSAFE_useContainerBreakpointValues.js +1 -1
- package/es/hooks/UNSAFE_useContainerBreakpoints.js +1 -1
- package/es/hooks/UNSAFE_useCurrentValueReducer.js +1 -1
- package/es/hooks/UNSAFE_useDebounce.js +1 -1
- package/es/hooks/UNSAFE_useFloating.js +2 -2
- package/es/hooks/UNSAFE_useFocus.js +1 -1
- package/es/hooks/UNSAFE_useFocusWithin.js +1 -1
- package/es/hooks/UNSAFE_useFocusableTextField.js +2 -2
- package/es/hooks/UNSAFE_useFormContext.js +1 -1
- package/es/hooks/UNSAFE_useFormFieldContext.js +1 -1
- package/es/hooks/UNSAFE_useFormVariantContext.js +1 -1
- package/es/hooks/UNSAFE_useHover.js +1 -1
- package/es/hooks/UNSAFE_useId.js +1 -1
- package/es/hooks/UNSAFE_useLengthFilter.js +1 -1
- package/es/hooks/UNSAFE_useLoadingIndicatorTimer.js +1 -1
- package/es/hooks/UNSAFE_useLongPress.js +1 -1
- package/es/hooks/UNSAFE_useMessagesContext.js +1 -1
- package/es/hooks/UNSAFE_useOutsideClick.js +1 -1
- package/es/hooks/UNSAFE_usePan.js +1 -1
- package/es/hooks/UNSAFE_usePrefixSuffix.js +1 -1
- package/es/hooks/UNSAFE_usePress.js +1 -1
- package/es/hooks/UNSAFE_useScale.js +1 -1
- package/es/hooks/UNSAFE_useSwipe.js +1 -1
- package/es/hooks/UNSAFE_useTabbableMode.js +1 -1
- package/es/hooks/UNSAFE_useTap.js +1 -1
- package/es/hooks/UNSAFE_useTextField.js +1 -1
- package/es/hooks/UNSAFE_useTextFieldInputHandlers.js +1 -1
- package/es/hooks/UNSAFE_useTheme.js +1 -1
- package/es/hooks/UNSAFE_useTimer.js +1 -1
- package/es/hooks/UNSAFE_useToggle.js +1 -1
- package/es/hooks/UNSAFE_useTooltip.css +4 -4
- package/es/hooks/UNSAFE_useTooltip.js +7 -7
- package/es/hooks/UNSAFE_useTooltip.js.map +1 -1
- package/es/hooks/UNSAFE_useTouch.js +1 -1
- package/es/hooks/UNSAFE_useTranslationBundle.js +1 -1
- package/es/hooks/UNSAFE_useUncontrolledState.js +1 -1
- package/es/hooks/UNSAFE_useUser.js +1 -1
- package/es/hooks/UNSAFE_useViewportIntersect.js +1 -1
- package/es/{index-ffca3da2.js → index-3daa5ed2.js} +2 -2
- package/es/{index-ffca3da2.js.map → index-3daa5ed2.js.map} +1 -1
- package/es/{keys-55f70933.js → keys-c87b7c09.js} +4 -4
- package/es/{keys-55f70933.js.map → keys-c87b7c09.js.map} +1 -1
- package/es/resources/nls/ar/bundle.js +1 -1
- package/es/resources/nls/ar-XB/bundle.js +1 -1
- package/es/resources/nls/bg/bundle.js +1 -1
- package/es/resources/nls/bs/bundle.js +1 -1
- package/es/resources/nls/bs-Cyrl/bundle.js +1 -1
- package/es/resources/nls/bundle.js +1 -1
- package/es/resources/nls/cs/bundle.js +1 -1
- package/es/resources/nls/da/bundle.js +1 -1
- package/es/resources/nls/de/bundle.js +1 -1
- package/es/resources/nls/el/bundle.js +1 -1
- package/es/resources/nls/en/bundle.js +1 -1
- package/es/resources/nls/en-XA/bundle.js +1 -1
- package/es/resources/nls/en-XC/bundle.js +1 -1
- package/es/resources/nls/es/bundle.js +1 -1
- package/es/resources/nls/et/bundle.js +1 -1
- package/es/resources/nls/fi/bundle.js +1 -1
- package/es/resources/nls/fr/bundle.js +1 -1
- package/es/resources/nls/fr-CA/bundle.js +1 -1
- package/es/resources/nls/he/bundle.js +1 -1
- package/es/resources/nls/hr/bundle.js +1 -1
- package/es/resources/nls/hu/bundle.js +1 -1
- package/es/resources/nls/is/bundle.js +1 -1
- package/es/resources/nls/it/bundle.js +1 -1
- package/es/resources/nls/ja/bundle.js +1 -1
- package/es/resources/nls/ko/bundle.js +1 -1
- package/es/resources/nls/lt/bundle.js +1 -1
- package/es/resources/nls/lv/bundle.js +1 -1
- package/es/resources/nls/ms/bundle.js +1 -1
- package/es/resources/nls/nl/bundle.js +1 -1
- package/es/resources/nls/no/bundle.js +1 -1
- package/es/resources/nls/pl/bundle.js +1 -1
- package/es/resources/nls/pt/bundle.js +1 -1
- package/es/resources/nls/pt-PT/bundle.js +1 -1
- package/es/resources/nls/ro/bundle.js +1 -1
- package/es/resources/nls/ru/bundle.js +1 -1
- package/es/resources/nls/sk/bundle.js +1 -1
- package/es/resources/nls/sl/bundle.js +1 -1
- package/es/resources/nls/sr/bundle.js +1 -1
- package/es/resources/nls/sr-Latn/bundle.js +1 -1
- package/es/resources/nls/supportedLocales.js +1 -1
- package/es/resources/nls/sv/bundle.js +1 -1
- package/es/resources/nls/th/bundle.js +1 -1
- package/es/resources/nls/tr/bundle.js +1 -1
- package/es/resources/nls/uk/bundle.js +1 -1
- package/es/resources/nls/vi/bundle.js +1 -1
- package/es/resources/nls/zh-Hans/bundle.js +1 -1
- package/es/resources/nls/zh-Hant/bundle.js +1 -1
- package/es/translationBundle.js +1 -1
- package/es/{tslib.es6-c822dcaf.js → tslib.es6-c66fc3f0.js} +2 -2
- package/es/{tslib.es6-c822dcaf.js.map → tslib.es6-c66fc3f0.js.map} +1 -1
- package/es/{useModal-ef9f23b8.js → useModal-6879e21d.js} +2 -2
- package/es/{useModal-ef9f23b8.js.map → useModal-6879e21d.js.map} +1 -1
- package/es/{useSingleSelection-407604a7.js → useSingleSelection-1e9df392.js} +2 -2
- package/es/{useSingleSelection-407604a7.js.map → useSingleSelection-1e9df392.js.map} +1 -1
- package/es/utils/PRIVATE_clientHints.js +3 -4
- package/es/utils/PRIVATE_clientHints.js.map +1 -1
- package/es/utils/PRIVATE_collectionUtils.js +1 -1
- package/es/utils/PRIVATE_dvtTestUtils.js +1 -1
- package/es/utils/PRIVATE_floatingUtils.js +1 -1
- package/es/utils/PRIVATE_meterUtils.js +1 -1
- package/es/utils/PRIVATE_refUtils.js +1 -1
- package/es/utils/PRIVATE_tabbableUtils.js +4 -4
- package/es/utils/PRIVATE_timer.js +1 -1
- package/es/utils/UNSAFE_arrayUtils.js +1 -1
- package/es/utils/UNSAFE_attributeUtils.js +1 -1
- package/es/utils/UNSAFE_classNames.js +1 -1
- package/es/utils/UNSAFE_componentUtils.js +1 -1
- package/es/utils/UNSAFE_dataProvider.js +1 -1
- package/es/utils/UNSAFE_dvtCommonUtils.js +1 -1
- package/es/utils/UNSAFE_filePickerUtils.js +1 -1
- package/es/utils/UNSAFE_getLocale.js +1 -1
- package/es/utils/UNSAFE_interpolations/aria.js +1 -1
- package/es/utils/UNSAFE_interpolations/borders.js +1 -1
- package/es/utils/UNSAFE_interpolations/boxalignment.css +15 -15
- package/es/utils/UNSAFE_interpolations/boxalignment.js +19 -19
- package/es/utils/UNSAFE_interpolations/boxalignment.js.map +1 -1
- package/es/utils/UNSAFE_interpolations/colors.js +1 -1
- package/es/utils/UNSAFE_interpolations/dimensions.js +2 -2
- package/es/utils/UNSAFE_interpolations/flexbox.css +7 -7
- package/es/utils/UNSAFE_interpolations/flexbox.js +11 -11
- package/es/utils/UNSAFE_interpolations/flexbox.js.map +1 -1
- package/es/utils/UNSAFE_interpolations/flexitem.css +7 -7
- package/es/utils/UNSAFE_interpolations/flexitem.js +11 -11
- package/es/utils/UNSAFE_interpolations/flexitem.js.map +1 -1
- package/es/utils/UNSAFE_interpolations/grid.js +1 -1
- package/es/utils/UNSAFE_interpolations/griditem.js +1 -1
- package/es/utils/UNSAFE_interpolations/padding.js +1 -1
- package/es/utils/UNSAFE_interpolations/text.css +3 -3
- package/es/utils/UNSAFE_interpolations/text.js +7 -7
- package/es/utils/UNSAFE_keys.js +1 -1
- package/es/utils/UNSAFE_lengthFilter.js +1 -1
- package/es/utils/UNSAFE_logger.js +3 -3
- package/es/utils/UNSAFE_matchTranslationBundle.js +1 -1
- package/es/utils/UNSAFE_mergeInterpolations.js +5 -5
- package/es/utils/UNSAFE_mergeProps.js +1 -1
- package/es/utils/UNSAFE_meterTypes.js +1 -1
- package/es/utils/UNSAFE_roles.js +1 -1
- package/es/utils/UNSAFE_selectUtils.js +1 -1
- package/es/utils/UNSAFE_size.js +1 -1
- package/es/utils/UNSAFE_soundUtils.js +1 -1
- package/es/utils/UNSAFE_stringUtils.js +1 -1
- package/es/utils/UNSAFE_typeUtils.js +1 -1
- package/es/utils/UNSAFE_units.js +1 -1
- package/es/utils/UNSAFE_valueUpdateDetail.js +1 -1
- package/package.json +1 -1
- package/amd/Badge-3c1f7f8b.js +0 -2
- package/amd/BaseButton-0f25e403.js +0 -2
- package/amd/Button-315621e2.js +0 -2
- package/amd/Chip-69627ba2.js +0 -2
- package/amd/ClearIcon-a009d82d.js +0 -2
- package/amd/ComponentMessage-b39def70.js +0 -2
- package/amd/Divider-139aab12.js +0 -2
- package/amd/Flex-49ae9d40.js +0 -2
- package/amd/FocusTrap-36eb14b3.js +0 -2
- package/amd/FormControlUtils-9dc2f278.js +0 -2
- package/amd/Heading-1940acfa.js +0 -2
- package/amd/HiddenAccessible-75a88dca.js +0 -2
- package/amd/Icon-09d9aaef.js +0 -2
- package/amd/Indexer-0d377bbe.js +0 -2
- package/amd/InlineHelpSource-ee7d0235.js +0 -2
- package/amd/Link-60e402da.js +0 -2
- package/amd/List-60513105.js +0 -2
- package/amd/ListItemTextLayout-a6d9f3f9.js +0 -2
- package/amd/Menu-dc7eb813.js +0 -2
- package/amd/MenuDivider-0746142f.js +0 -2
- package/amd/MenuItem-558c427d.js +0 -2
- package/amd/MessageCloseButton-9115578a.js +0 -2
- package/amd/MessageDetail-bca5d0e6.js +0 -2
- package/amd/MessageLayer-6345dea9.js +0 -2
- package/amd/MessageStartIcon-a7b50582.js +0 -2
- package/amd/MessageSummary-8871a900.js +0 -2
- package/amd/MessageTimestamp-0b535a61.js +0 -2
- package/amd/MessageToast-973879f6.js +0 -2
- package/amd/MeterCircle-99d0ae85.js +0 -2
- package/amd/Modal-4ef84a44.js +0 -2
- package/amd/ReadonlyTextFieldInput-2ff54b4e.js +0 -2
- package/amd/SelectMenuItem-70865f13.js +0 -2
- package/amd/Skeleton-13c57283.js +0 -2
- package/amd/SplitMenuButton-34bda460.js +0 -2
- package/amd/Subheading-53920c82.js +0 -2
- package/amd/Text-dd98aad8.js +0 -2
- package/amd/TextArea-f5ceacdf.js +0 -2
- package/amd/TextFieldInput-e8475857.js +0 -2
- package/amd/_curry3-d85ab9e3.js +0 -2
- package/amd/_has-d6e072c4.js +0 -2
- package/amd/clientHints-421618b0.js +0 -2
- package/amd/clientHints-421618b0.js.map +0 -1
- package/amd/flexbox-af3b62ca.js +0 -2
- package/amd/flexitem-7f1eca3f.js +0 -2
- package/amd/keys-2f73271e.js +0 -2
- package/cjs/clientHints-304675d3.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilePicker-df6e5ba2.js","sources":["../../src/UNSAFE_FilePicker/FilePickerUtils.tsx","../../src/UNSAFE_FilePicker/postValidationUtils.tsx","../../src/UNSAFE_FilePicker/useFilePickerElement.tsx","../../src/UNSAFE_FilePicker/FilePicker.tsx"],"sourcesContent":["import { ComponentMessageItem } from '../UNSAFE_ComponentMessage';\nimport { Text } from '../UNSAFE_Text';\nimport { Spacer } from '../UNSAFE_Spacer';\nimport { sizeToCSS } from '../utils/UNSAFE_size';\nimport { trim } from '../utils/UNSAFE_stringUtils';\nimport { BundleType } from '../resources/nls/bundle';\n\nimport { FilePicker } from './FilePicker';\n\nimport { JSX, ComponentProps } from 'preact';\n\ntype FilePickerProps = ComponentProps<typeof FilePicker>;\n\n/**\n * Gets the default content of the file picker\n */\nexport const getDefaultTriggerContent = (\n isDisabled: FilePickerProps['isDisabled'],\n primaryText: FilePickerProps['primaryText'],\n secondaryText: FilePickerProps['secondaryText'],\n translations: BundleType,\n selectionMode: FilePickerProps['selectionMode']\n) => {\n return [\n <Text variant={isDisabled ? 'disabled' : 'primary'} weight=\"bold\" size=\"xl\">\n {getPrimaryText(primaryText, translations)}\n </Text>,\n <Spacer height=\"1.5x\"></Spacer>,\n <Text variant={isDisabled ? 'disabled' : 'secondary'} size=\"sm\">\n {getSecondaryText(secondaryText, translations, selectionMode)}\n </Text>\n ];\n};\n\n/**\n * Returns the aria label\n */\ntype AriaLabelProps = {\n accessibleLabel: FilePickerProps['accessibleLabel'];\n isDisabled: FilePickerProps['isDisabled'];\n translations: BundleType;\n primaryText?: FilePickerProps['primaryText'];\n secondaryText?: FilePickerProps['secondaryText'];\n selectionMode?: FilePickerProps['selectionMode'];\n};\nexport const getAriaLabel = ({\n accessibleLabel,\n isDisabled,\n translations,\n primaryText,\n secondaryText,\n selectionMode\n}: AriaLabelProps) => {\n return accessibleLabel\n ? accessibleLabel\n : `${isDisabled ? '' : translations.filePicker_addFiles() + '. '}${getPrimaryText(\n primaryText,\n translations\n )}. ${getSecondaryText(secondaryText, translations, selectionMode)}`;\n};\n\n/**\n * Returns the styles of the file picker\n */\nexport const getStyles = (width: FilePickerProps['width'], height: FilePickerProps['height']) => {\n const dimStyles: JSX.CSSProperties = {\n width: width ? sizeToCSS(width) : undefined,\n height: height ? sizeToCSS(height) : undefined\n };\n return dimStyles;\n};\n\n/**\n * Returns the primary text\n */\nconst getPrimaryText = (primaryText: FilePickerProps['primaryText'], translations: BundleType) => {\n return primaryText ? primaryText : translations.filePicker_dropzonePrimaryText();\n};\n\n/**\n * Returns the secondary text text\n */\nconst getSecondaryText = (\n secondaryText: FilePickerProps['secondaryText'],\n translations: BundleType,\n selectionMode: FilePickerProps['selectionMode']\n) => {\n const defaultSecondaryText =\n selectionMode === 'multiple'\n ? translations.filePicker_dropzoneSecondaryTextMultiple()\n : translations.filePicker_dropzoneSecondaryText();\n return secondaryText ? secondaryText : defaultSecondaryText;\n};\n\n/**\n * Takes in a list of files and returns a list of accepted files and\n * a list of rejected files based on file type\n */\nexport const validateTypes = (\n files: FileList,\n accept: FilePickerProps['accept'],\n translations: BundleType\n) => {\n const accepted = [];\n const rejected = [];\n let file: File;\n let type: string;\n if (files) {\n for (let i = 0; i < files.length; i++) {\n file = files[i];\n const name = file.name;\n type = translations.filePicker_unknownFileTypeUploadError();\n if (name) {\n const nameSplit = name.split('.');\n type = nameSplit.length > 1 ? '.' + nameSplit.pop() : type;\n }\n type = file.type ? file.type : type;\n // If type isn't already in one of the lists, add it\n if (accepted.indexOf(type) === -1 && rejected.indexOf(type) === -1) {\n if (_acceptFile(file, accept)) {\n accepted.push(type);\n } else {\n rejected.push(type);\n }\n }\n }\n }\n return { accepted, rejected };\n};\n\n/**\n * Creates a file list\n */\nexport const createFileList = (origList: FileList | DataTransferItemList) => {\n const descriptor: Record<string | number, PropertyDescriptor> = {\n length: { value: origList.length },\n item: {\n value(index: number): File {\n return (this as unknown as FileList)[index];\n }\n }\n };\n for (let i = 0; i < origList.length; i++) {\n descriptor[i] = { value: origList[i], enumerable: true };\n }\n\n return Object.create(FileList.prototype, descriptor);\n};\n\n/**\n * Returns false if selected multiple files when in single file selection mode\n */\nexport const validateSelectionMode = (\n files: FileList,\n selectionMode: FilePickerProps['selectionMode']\n) => {\n return selectionMode !== 'single' || files.length === 1;\n};\n\n/**\n * Returns the correct message if mime type validation has failed\n */\nexport const getMimeTypeValidationMessages = (\n rejected: Array<string>,\n translations: BundleType\n): ComponentMessageItem[] => {\n const messages: ComponentMessageItem[] = [];\n if (rejected.length === 1) {\n messages.push({\n severity: 'error',\n summary: translations.filePicker_singleTypeUploadError({\n fileType: rejected[0]\n })\n });\n } else {\n messages.push({\n severity: 'error',\n summary: translations.filePicker_multipleFileTypeUploadError({\n fileTypes: rejected.join(translations.plural_separator())\n })\n });\n }\n return messages;\n};\n\n/**\n * Returns true if file passes mimetype validation\n */\nconst _acceptFile = (file: File, accept: FilePickerProps['accept']) => {\n const acceptProp = accept;\n if (!acceptProp || acceptProp.length === 0 || !file) {\n return true;\n }\n\n let fileAccept;\n for (let i = 0; i < acceptProp.length; i++) {\n fileAccept = trim(acceptProp[i]) as string;\n if (!fileAccept) {\n return true;\n } else if (fileAccept.startsWith('.', 0)) {\n // when dragover, only MIME type is available, file name is undefined\n // to lowerCase is to make the string comparison case insensitive\n if (!file.name || (file.name && file.name.toLowerCase().endsWith(fileAccept.toLowerCase()))) {\n return true;\n }\n } else if (!file.type) {\n return false;\n } else if (fileAccept === 'image/*') {\n if (file.type.startsWith('image/', 0)) {\n return true;\n }\n } else if (fileAccept === 'video/*') {\n if (file.type.startsWith('video/', 0)) {\n return true;\n }\n } else if (fileAccept === 'audio/*') {\n if (file.type.startsWith('audio/', 0)) {\n return true;\n }\n } else if (file.type === fileAccept) {\n return true;\n }\n }\n return false;\n};\n","import { ComponentMessageItem } from '../UNSAFE_ComponentMessage';\n\nimport { createFileList } from './FilePickerUtils';\nimport { RejectDetail, CommitDetail } from './FilePicker';\n\n/**\n * Calls the onReject callback when invalid files are selected.\n * For invalid dragged files, this function will return a promise resolver that\n * should be called when the invalid files are no longer dragged over the filepicker.\n */\nexport const fireRejectAction = (\n messages: ComponentMessageItem[],\n isDrag: boolean,\n onReject?: (detail: RejectDetail) => void\n) => {\n let resolver;\n const dragPromise = isDrag\n ? new Promise<void>((resolve) => {\n resolver = resolve;\n })\n : null;\n\n onReject?.({\n messages,\n until: dragPromise\n });\n return resolver;\n};\n\n/**\n * Calls the onCommit callback when all files are valid.\n */\nexport const handleFilesAdded = (files: FileList, onCommit?: (detail: CommitDetail) => void) => {\n // Bug 28503874 - filepicker: filelist cleared after the handler returns\n // Note: the parameter \"files\" is a direct reference to the embedded Input element's property\n // which could be reset or changed.\n // we need to return a copy of FileList just in case apps hold on to a reference to FileList\n const list = createFileList(files);\n onCommit?.({\n files: list\n });\n};\n","import { pickFiles } from '../utils/UNSAFE_filePickerUtils';\nimport { getClientHints } from '../utils/PRIVATE_clientHints';\nimport { usePress } from '../hooks/UNSAFE_usePress';\nimport { useHover } from '../hooks/UNSAFE_useHover';\nimport { ComponentMessageItem } from '../UNSAFE_ComponentMessage';\nimport { BundleType } from '../resources/nls/bundle';\n\nimport { FilePicker, CommitDetail, RejectDetail } from './FilePicker';\nimport {\n validateTypes,\n getMimeTypeValidationMessages,\n createFileList,\n validateSelectionMode\n} from './FilePickerUtils';\nimport { fireRejectAction, handleFilesAdded } from './postValidationUtils';\n\nimport { ComponentProps } from 'preact';\nimport { useRef, Ref, StateUpdater } from 'preact/hooks';\n\ntype FilePickerProps = ComponentProps<typeof FilePicker>;\n\ntype FilePickerElementProps = FilePickerProps & {\n translations: BundleType;\n};\n\n/**\n * The file picker helper method for non-disabled filepickers.\n */\nexport const useFilepickerElementHelper = (\n props: FilePickerElementProps,\n rootRef: Ref<HTMLDivElement>,\n setValidity?: StateUpdater<'NA' | 'valid' | 'invalid'>\n) => {\n const { callback, validation } = clickCallbackUtils(props);\n const { pressProps } = usePress(callback);\n\n const dragAndDropProps = useDragAndDropEvents(\n props.accept,\n props.selectionMode,\n fireRejectAction,\n handleFilesAdded,\n rootRef,\n props.translations,\n props.onCommit,\n props.onReject,\n setValidity\n );\n const { hoverProps, isHover } = useHover({ isDisabled: false });\n return {\n validation,\n dragAndDropProps,\n pressProps,\n isHover,\n hoverProps\n };\n};\n\ntype ClickProps = {\n accept?: FilePickerProps['accept'];\n capture?: FilePickerProps['capture'];\n selectionMode?: FilePickerProps['selectionMode'];\n onCommit?: FilePickerProps['onCommit'];\n onReject?: FilePickerProps['onReject'];\n translations: BundleType;\n};\n\nconst clickCallbackUtils = (props: ClickProps) => {\n /**\n * Callback function when the filepicker is clicked.\n */\n const handleSelectingFiles = (event: Event) => {\n // Bug 27775173 - within firefox browser cannot tab past filepicker without file selector\n // window opening\n // only launching the file picker if click or 'Enter' was pressed\n if (\n event.type === 'click' ||\n (event.type === 'keyup' && (event as KeyboardEvent).code === 'Enter')\n ) {\n // Bug 26907138 - form submit event is triggered when the file upload button is clicked\n event.preventDefault();\n\n pickFiles(_handleClickValidation, {\n accept: props.accept,\n selectionMode: props.selectionMode ?? 'multiple',\n capture: props.capture ?? 'none'\n });\n }\n };\n\n /**\n * Handles file validation from selecting files through the file dialog\n */\n const _handleClickValidation = (files: FileList) => {\n if (files.length > 0) {\n const rejected = validateTypes(files, props.accept, props.translations).rejected;\n if (rejected.length > 0) {\n fireRejectAction(\n getMimeTypeValidationMessages(rejected, props.translations),\n false,\n props.onReject\n );\n } else {\n handleFilesAdded(files, props.onCommit);\n }\n }\n };\n return {\n callback: handleSelectingFiles,\n validation: _handleClickValidation\n };\n};\n\nconst useDragAndDropEvents = (\n accept: FilePickerProps['accept'],\n selectionMode: FilePickerProps['selectionMode'],\n fireRejectAction: (\n messages: ComponentMessageItem[],\n isDrag: boolean,\n onReject?: (detail: RejectDetail) => void\n ) => any,\n handleFilesAdded: (files: FileList, onCommit?: (detail: CommitDetail) => void) => void,\n rootRef: Ref<HTMLDivElement>,\n translations: BundleType,\n onCommit?: (detail: CommitDetail) => void,\n onReject?: (detail: RejectDetail) => void,\n // setValidity not set for custom filepicker\n setValidity?: StateUpdater<'NA' | 'valid' | 'invalid'>\n) => {\n const inDropZone = useRef<boolean>(false);\n const isDroppable = useRef<boolean>(false);\n const dragPromiseResolver = useRef<() => void>();\n\n /**\n * Drag Enter handler called when a dragged file enter the filepicker dropzone\n */\n const _handleDragEnter = (event: Event) => {\n event.preventDefault();\n event.stopPropagation();\n };\n\n /**\n * Drag over handler called when a file is dragged over the filepicker\n */\n const _handleDragOver = (event: DragEvent) => {\n event.preventDefault();\n event.stopPropagation();\n if (inDropZone.current) {\n return;\n }\n\n const browser = getClientHints().browser;\n inDropZone.current = true;\n isDroppable.current = true;\n // Safari doesn't provide the data for the files on drag over so validation cannot be done until drop\n if (browser !== 'safari') {\n if (!event.dataTransfer) {\n return;\n }\n const files = createFileList(event.dataTransfer.items);\n let messages = [] as ComponentMessageItem[];\n const selectionModeValid = validateSelectionMode(files, selectionMode);\n const droppable = validateTypes(files, accept, translations);\n if (selectionModeValid && droppable.rejected.length === 0) {\n // validation passes\n setValidity?.('valid');\n } else {\n isDroppable.current = false;\n if (selectionModeValid) {\n // mimetype Validation fails\n messages = getMimeTypeValidationMessages(droppable.rejected, translations);\n } else {\n // selected multiple files in single selection mode\n messages.push({\n severity: 'error',\n summary: translations.filePicker_singleFileUploadError()\n });\n }\n setValidity?.('invalid');\n dragPromiseResolver.current = fireRejectAction(messages, true, onReject);\n }\n } else {\n setValidity?.('valid');\n }\n };\n\n /**\n * Drag leave handler is called when the dragged file leaves the filepicker dropzone\n */\n const _handleDragLeave = (event: DragEvent, mimeTypeDropFail = false) => {\n if (!inDropZone.current) {\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n if (!rootRef.current?.contains(event.relatedTarget as Node)) {\n inDropZone.current = false;\n setValidity?.('NA');\n // There's only a promise if validation failed on dragover\n if (!isDroppable.current && !mimeTypeDropFail) {\n dragPromiseResolver.current?.();\n }\n }\n };\n\n /**\n * Drop file handler is called when a file is dropped on the filepicker dropzone\n */\n const _handleFileDrop = (event: DragEvent) => {\n if (inDropZone.current) {\n event.preventDefault();\n event.stopPropagation();\n if (!event.dataTransfer) {\n inDropZone.current = false;\n return;\n }\n const files = createFileList(event.dataTransfer.files);\n let mimeTypeDropFail = false;\n if (isDroppable.current) {\n let messages: ComponentMessageItem[] = [];\n if (validateSelectionMode(files, selectionMode)) {\n const droppable = validateTypes(files, accept, translations);\n if (droppable.rejected.length > 0) {\n // mimetype Validation fails\n messages = getMimeTypeValidationMessages(droppable.rejected, translations);\n mimeTypeDropFail = true;\n }\n } else {\n messages.push({\n severity: 'error',\n summary: translations.filePicker_singleFileUploadError()\n });\n }\n if (messages.length > 0) {\n isDroppable.current = false;\n fireRejectAction(messages, false, onReject);\n }\n if (isDroppable.current) {\n handleFilesAdded(files, onCommit);\n }\n }\n _handleDragLeave(event, mimeTypeDropFail);\n }\n };\n\n return {\n onDragEnter: _handleDragEnter,\n onDragOver: _handleDragOver,\n onDragLeave: _handleDragLeave,\n onDrop: _handleFileDrop\n };\n};\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * Licensed under The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\nimport { mergeProps } from '../utils/UNSAFE_mergeProps';\nimport { Size } from '../utils/UNSAFE_size';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { useTranslationBundle } from '../hooks/UNSAFE_useTranslationBundle';\nimport type { BundleType } from '../resources/nls/bundle';\nimport { ComponentMessageItem } from '../UNSAFE_ComponentMessage';\nimport { cssProps } from '@oracle/oraclejet-cssprops';\n\nimport { getDefaultTriggerContent, getAriaLabel, getStyles } from './FilePickerUtils';\nimport { useFilepickerElementHelper } from './useFilePickerElement';\n\nimport { ComponentChildren } from 'preact';\nimport { useState, useRef, useImperativeHandle } from 'preact/hooks';\nimport { ForwardedRef } from 'preact/compat';\nimport { useTabbableMode } from '../hooks/UNSAFE_useTabbableMode';\n\n// TODO: Andy's comment below JET-53230\n// The FilePicker supports two very different use cases: default and custom file pickers. Should we consider dropping the wrapper and instead exporting the two underlying components (with the appropriate property types) directly?\n// If not, perhaps we should look into defining the Props type as a discriminated union such that primaryText/secondaryText props are only valid when children is not specified?\n\ntype Props = {\n /**\n * An array of strings of allowed MIME types or file extensions that can be uploaded; this is unlike the accept attribute of the html <input> element that accepts a simple comma-delimited string. If not specified, all file types will be accepted.\n * <p>Note: If accept is specified, files with empty string type will be rejected if no match found in the \"accept\" value. */\n accept?: string[];\n\n /**\n * Specifies the preferred facing mode for the device's\n * <a href=\"https://www.w3.org/TR/html-media-capture/#dom-htmlinputelement-capture\">media capture</a> mechanism;\n * This is most often used to provide direct camera access on mobile devices. Note that the accept attribute must\n * be specified and have an associated capture control type (e.g.[\"image/*\"]) for the capture attribute to take effect. Support may vary by browser.\n *\n */\n capture?: 'user' | 'environment' | 'implementation' | 'none';\n\n /**\n * Disables the filepicker if set to <code class=\"prettyprint\">true</code>.\n */\n isDisabled?: boolean;\n\n /**\n * The primary text for the default file picker.\n */\n primaryText?: string;\n\n /**\n * The secondary text for the default file picker.\n */\n secondaryText?: string;\n /**\n * Whether to allow single or multiple file selection.\n */\n selectionMode?: 'multiple' | 'single';\n\n /**\n * A label to be used for accessibility purposes.\n */\n accessibleLabel?: string;\n\n /**\n * Property that triggers a callback immediately when a set of files have been committed\n */\n onCommit?: (detail: CommitDetail) => void;\n\n /**\n * Property that triggers a callback immediately when a set of files have been rejected\n */\n onReject?: (detail: RejectDetail) => void;\n\n /**\n * Width of the File Picker\n */\n width?: Size;\n\n /**\n * Height of the File Picker\n */\n height?: Size;\n\n /**\n * If the children is provided, its contents replace the default filepicker. Filepicker will still set role and aria-label, but\n * the application is responsible for setting the tabindex.\n */\n children?: ComponentChildren;\n};\n\nexport type CommitDetail = {\n files: FileList;\n};\n\nexport type RejectDetail = {\n /**\n * Messages that should be displayed to the user (e.g. in an oj-messages component) describing rejected files.\n */\n messages: ComponentMessageItem[];\n\n /**\n * This property may be populated with a Promise to provide short-term feedback during a user interaction (typically drag and drop); the feedback should be cleared upon the resolution of this Promise.\n */\n until: Promise<void> | null;\n};\n\n/**\n * A file picker displays a clickable dropzone for selecting files from the device storage.\n */\nexport function FilePicker({\n capture = 'none',\n isDisabled = false,\n selectionMode = 'multiple',\n children,\n ...otherProps\n}: Props) {\n // this ref is added only for testing purposes. Allows the test to directly\n // call certain functions that should be tested\n const testHandlersRef = (otherProps as any).__testHandlerSymbol;\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const props = { capture, selectionMode, translations, ...otherProps };\n if (isDisabled) {\n return <DisabledFilePicker {...props}>{children}</DisabledFilePicker>;\n }\n return children ? (\n <CustomFilePicker testHandlersRef={testHandlersRef} {...props}>\n {children}\n </CustomFilePicker>\n ) : (\n <DefaultFilePicker testHandlersRef={testHandlersRef} {...props} />\n );\n}\n\ntype FilePickerProps = Props & {\n translations: BundleType;\n};\n\ntype DndProps = {\n onDragEnter: (event: Event) => void;\n onDragOver: (event: DragEvent) => void;\n onDragLeave: (event: DragEvent, mimeTypeDropFail: boolean) => void;\n onDrop: (event: DragEvent) => void;\n};\n\nexport type TestHandlersRef = ForwardedRef<\n DndProps & {\n onClickSelected: (files: FileList) => void;\n }\n>;\n\ntype TestHandlerProps = {\n // this ref is populated only in tests\n testHandlersRef?: TestHandlersRef;\n};\n\ntype DefaultProps = Omit<FilePickerProps, 'isDisabled' | 'children'> & TestHandlerProps;\n\n/**\n * The default file picker element.\n */\nconst DefaultFilePicker = (props: DefaultProps) => {\n const [validity, setValidity] = useState<'NA' | 'valid' | 'invalid'>('NA');\n\n // class added to change bg/border color based on if file is valid on drag and drop\n const validityClass =\n validity === 'valid' ? 'oj-c-valid-drop' : validity === 'invalid' ? 'oj-c-invalid-drop' : '';\n const rootRef = useRef<HTMLDivElement>(null);\n\n const { validation, dragAndDropProps, pressProps, isHover, hoverProps } =\n useFilepickerElementHelper(props, rootRef, setValidity);\n const mergedEventProps = mergeProps(pressProps, hoverProps);\n\n // These are backdoor handles that are used for testing purposes only\n useSetupTestRef(dragAndDropProps, validation, props.testHandlersRef || null);\n const classes = classNames([\n styles.base,\n props.width === undefined && styles.maxWidth,\n isHover && styles.hover\n ]);\n const { isTabbable } = useTabbableMode();\n const {\n accessibleLabel,\n primaryText,\n secondaryText,\n translations,\n selectionMode,\n width,\n height\n } = props;\n return (\n <div\n {...mergedEventProps}\n class={classes}\n tabIndex={isTabbable ? 0 : -1}\n role=\"button\"\n aria-label={getAriaLabel({\n accessibleLabel,\n isDisabled: false,\n translations,\n primaryText,\n secondaryText,\n selectionMode\n })}\n ref={rootRef}\n style={getStyles(width, height)}>\n <div class={classNames([styles.inner, validityClass])} {...dragAndDropProps}>\n {getDefaultTriggerContent(false, primaryText, secondaryText, translations, selectionMode)}\n </div>\n </div>\n );\n};\n\ntype DisabledProps = Omit<\n FilePickerProps,\n 'accept' | 'capture' | 'onCommit' | 'onReject' | 'isDisabled'\n>;\n\n/**\n * The disabled file picker element.\n */\nconst DisabledFilePicker = ({\n children,\n accessibleLabel,\n primaryText,\n secondaryText,\n translations,\n selectionMode,\n width,\n height\n}: DisabledProps) => {\n return (\n <div\n class={classNames([\n childrenStyles,\n styles.base,\n styles.inner,\n width === undefined && styles.maxWidth,\n 'oj-c-filepicker-disabled'\n ])}\n role=\"button\"\n aria-label={getAriaLabel({\n accessibleLabel,\n isDisabled: true,\n translations,\n primaryText,\n secondaryText\n })}\n aria-hidden=\"true\"\n style={getStyles(width, height)}>\n {children ||\n getDefaultTriggerContent(true, primaryText, secondaryText, translations, selectionMode)}\n </div>\n );\n};\n\ntype CustomProps = Omit<FilePickerProps, 'isDisabled' | 'primaryText' | 'secondaryText'> &\n TestHandlerProps;\n\n/**\n * The custom file picker element.\n */\nconst CustomFilePicker = (props: CustomProps) => {\n const rootRef = useRef<HTMLDivElement>(null);\n const { validation, dragAndDropProps, pressProps, isHover, hoverProps } =\n useFilepickerElementHelper(props, rootRef);\n const mergedEventProps = mergeProps(pressProps, dragAndDropProps, hoverProps);\n\n // These are backdoor handles that are used for testing purposes only\n useSetupTestRef(dragAndDropProps, validation, props.testHandlersRef || null);\n\n const classes = classNames([\n styles.base,\n props.width === undefined && styles.maxWidth,\n isHover && styles.hover\n ]);\n const { accessibleLabel, translations, selectionMode } = props;\n const { isTabbable } = useTabbableMode();\n return (\n <div\n class={classNames([classes, childrenStyles])}\n tabIndex={isTabbable ? undefined : -1}\n role=\"button\"\n aria-label={getAriaLabel({ accessibleLabel, isDisabled: false, translations, selectionMode })}\n ref={rootRef}\n style={getStyles(props.width, props.height)}\n {...mergedEventProps}>\n {props.children}\n </div>\n );\n};\n\n/**\n * Only called for testing purposes, sets up the test ref that\n * allows for backdoor access to certain methods\n */\nconst useSetupTestRef = (\n dragAndDropProps: DndProps,\n validation: (files: FileList) => void,\n testHandlersRef: TestHandlersRef\n) => {\n useImperativeHandle(testHandlersRef, () => ({\n onDragEnter: dragAndDropProps.onDragEnter,\n onDragOver: dragAndDropProps.onDragOver,\n onDrop: dragAndDropProps.onDrop,\n onDragLeave: dragAndDropProps.onDragLeave,\n onClickSelected: validation\n }));\n};\n\nconst styles = {\n base: cssProps`${{\n display: 'block',\n height: '100%',\n width: '100%'\n }}`,\n maxWidth: cssProps`${{\n maxWidth: '400px'\n }}`,\n inner: cssProps`${{\n justifyContent: 'space-between',\n alignItems: 'center',\n boxSizing: 'border-box',\n borderRadius: 'var(--oj-c-PRIVATE-DO-NOT-USE-file-picker-border-radius)',\n paddingTop: 'var(--oj-c-PRIVATE-DO-NOT-USE-file-picker-padding)',\n paddingRight: 'var(--oj-c-PRIVATE-DO-NOT-USE-file-picker-padding)',\n paddingLeft: 'var(--oj-c-PRIVATE-DO-NOT-USE-file-picker-padding)',\n paddingBottom: 'var(--oj-c-PRIVATE-DO-NOT-USE-file-picker-padding)',\n height: '100%',\n borderStyle: 'dashed',\n borderWidth: 'var(--oj-c-PRIVATE-DO-NOT-USE-file-picker-border-width)',\n backgroundColor: 'var(--oj-c-PRIVATE-DO-NOT-USE-file-picker-bg-color)',\n borderColor: 'var(--oj-c-PRIVATE-DO-NOT-USE-file-picker-border-color)',\n '&:active': { backgroundColor: 'var(--oj-c-PRIVATE-DO-NOT-USE-core-bg-color-active)' }\n }}`,\n hover: cssProps`${{\n // @ts-ignore\n '&:not(:active)': {\n cursor: 'var(--oj-c-PRIVATE-DO-NOT-USE-file-picker-cursor)'\n }\n }}`,\n\n pseudohover: cssProps`${{\n // @ts-ignore\n '@media(hover: hover)': {\n '&:hover:enabled:not(:active)': {\n cursor: 'var(--oj-c-PRIVATE-DO-NOT-USE-file-picker-cursor)'\n }\n }\n }}`\n};\nconst childrenStyles = cssProps`${{\n /* @ts-ignore */\n '& > *': {\n marginTop: '0 !important',\n marginBottom: '0 !important',\n marginLeft: '0 !important',\n marginRight: '0 !important'\n }\n}}`;\n"],"names":["getDefaultTriggerContent","isDisabled","primaryText","secondaryText","translations","selectionMode","_jsx","Text","Object","assign","variant","weight","size","children","getPrimaryText","Spacer","height","jsx","getSecondaryText","getAriaLabel","accessibleLabel","filePicker_addFiles","getStyles","width","sizeToCSS","undefined","filePicker_dropzonePrimaryText","defaultSecondaryText","filePicker_dropzoneSecondaryTextMultiple","filePicker_dropzoneSecondaryText","validateTypes","files","accept","accepted","rejected","file","type","i","length","name","filePicker_unknownFileTypeUploadError","nameSplit","split","pop","indexOf","_acceptFile","push","createFileList","origList","descriptor","value","item","index","this","enumerable","create","FileList","prototype","validateSelectionMode","getMimeTypeValidationMessages","messages","severity","summary","filePicker_singleTypeUploadError","fileType","filePicker_multipleFileTypeUploadError","fileTypes","join","plural_separator","acceptProp","fileAccept","trim","startsWith","toLowerCase","endsWith","fireRejectAction","isDrag","onReject","resolver","dragPromise","Promise","resolve","until","handleFilesAdded","onCommit","list","useFilepickerElementHelper","props","rootRef","setValidity","callback","validation","clickCallbackUtils","pressProps","usePress","dragAndDropProps","useDragAndDropEvents","hoverProps","isHover","useHover","_handleClickValidation","event","code","preventDefault","pickFiles","_a","capture","_b","inDropZone","useRef","isDroppable","dragPromiseResolver","_handleDragLeave","mimeTypeDropFail","current","stopPropagation","contains","relatedTarget","call","onDragEnter","onDragOver","browser","getClientHints","dataTransfer","items","selectionModeValid","droppable","filePicker_singleFileUploadError","onDragLeave","onDrop","DefaultFilePicker","styles","base","maxWidth","isTabbable","useTabbableMode","DisabledFilePicker","class","classNames","inner","role","style","CustomFilePicker","classes","childrenStyles","tabIndex","ref","mergedEventProps","useSetupTestRef","testHandlersRef","useImperativeHandle","onClickSelected","otherProps","__rest","__testHandlerSymbol","useTranslationBundle"],"mappings":"klBAgBO,MAAMA,EAA2B,CACtCC,EACAC,EACAC,EACAC,EACAC,IAEO,CACLC,MAACC,EAAAA,KAAIC,OAAAC,OAAA,CAACC,QAAST,EAAa,WAAa,UAAWU,OAAO,OAAOC,KAAK,MAAI,CAAAC,SACxEC,EAAeZ,EAAaE,MAE/BE,EAAAA,IAACS,EAAMA,OAAA,CAACC,OAAO,SACfV,EAACW,IAAAV,EAAIA,KAACC,OAAAC,OAAA,CAAAC,QAAST,EAAa,WAAa,YAAaW,KAAK,MAAI,CAAAC,SAC5DK,EAAiBf,EAAeC,EAAcC,OAgBxCc,EAAe,EAC1BC,gBAAAA,EACAnB,WAAAA,EACAG,aAAAA,EACAF,YAAAA,EACAC,cAAAA,EACAE,cAAAA,KAEOe,GAEH,GAAGnB,EAAa,GAAKG,EAAaiB,sBAAwB,OAAOP,EAC/DZ,EACAE,OACIc,EAAiBf,EAAeC,EAAcC,KAM7CiB,EAAY,CAACC,EAAiCP,KACpB,CACnCO,MAAOA,EAAQC,YAAUD,QAASE,EAClCT,OAAQA,EAASQ,YAAUR,QAAUS,IAQnCX,EAAiB,CAACZ,EAA6CE,IAC5DF,GAA4BE,EAAasB,iCAM5CR,EAAmB,CACvBf,EACAC,EACAC,KAEA,MAAMsB,EACc,aAAlBtB,EACID,EAAawB,2CACbxB,EAAayB,mCACnB,OAAO1B,GAAgCwB,GAO5BG,EAAgB,CAC3BC,EACAC,EACA5B,KAEA,MAAM6B,EAAW,GACXC,EAAW,GACjB,IAAIC,EACAC,EACJ,GAAIL,EACF,IAAK,IAAIM,EAAI,EAAGA,EAAIN,EAAMO,OAAQD,IAAK,CACrCF,EAAOJ,EAAMM,GACb,MAAME,EAAOJ,EAA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A,OAAAhD,EAAA,CAAA,UAAA,aAAA,gBAAA,aASzB,MAAA4C,EAAAG,EAAAE,oBACAtJ,EAAAuJ,uBAAA,0FAEA,OAAA1J,EACEK,EAAAA,IAAAkI,EAAAhI,OAAAC,OAAA,GAAA8E,EAAA,CAAA1E,SAAAA,KAEFA,EAAAP,EAAAW,IAAA6H,EAAAtI,OAAAC,OAAA,CAAA4I,gBAAAA,GAAA9D,EAAA,CAAA1E,SAAAA,KAAAP,EAAAW,IAAAiH,EAAA1H,OAAAC,OAAA,CAAA4I,gBAAAA,GAAA9D"}
|
|
1
|
+
{"version":3,"file":"FilePicker-29e7242f.js","sources":["../../src/UNSAFE_FilePicker/FilePickerUtils.tsx","../../src/UNSAFE_FilePicker/postValidationUtils.tsx","../../src/UNSAFE_FilePicker/useFilePickerElement.tsx","../../src/UNSAFE_FilePicker/FilePicker.tsx"],"sourcesContent":["import { ComponentMessageItem } from '../UNSAFE_ComponentMessage';\nimport { Text } from '../UNSAFE_Text';\nimport { Spacer } from '../UNSAFE_Spacer';\nimport { sizeToCSS } from '../utils/UNSAFE_size';\nimport { trim } from '../utils/UNSAFE_stringUtils';\nimport { BundleType } from '../resources/nls/bundle';\n\nimport { FilePicker } from './FilePicker';\n\nimport { JSX, ComponentProps } from 'preact';\n\ntype FilePickerProps = ComponentProps<typeof FilePicker>;\n\n/**\n * Gets the default content of the file picker\n */\nexport const getDefaultTriggerContent = (\n isDisabled: FilePickerProps['isDisabled'],\n primaryText: FilePickerProps['primaryText'],\n secondaryText: FilePickerProps['secondaryText'],\n translations: BundleType,\n selectionMode: FilePickerProps['selectionMode']\n) => {\n return [\n <Text variant={isDisabled ? 'disabled' : 'primary'} weight=\"bold\" size=\"xl\">\n {getPrimaryText(primaryText, translations)}\n </Text>,\n <Spacer height=\"1.5x\"></Spacer>,\n <Text variant={isDisabled ? 'disabled' : 'secondary'} size=\"sm\">\n {getSecondaryText(secondaryText, translations, selectionMode)}\n </Text>\n ];\n};\n\n/**\n * Returns the aria label\n */\ntype AriaLabelProps = {\n accessibleLabel: FilePickerProps['accessibleLabel'];\n isDisabled: FilePickerProps['isDisabled'];\n translations: BundleType;\n primaryText?: FilePickerProps['primaryText'];\n secondaryText?: FilePickerProps['secondaryText'];\n selectionMode?: FilePickerProps['selectionMode'];\n};\nexport const getAriaLabel = ({\n accessibleLabel,\n isDisabled,\n translations,\n primaryText,\n secondaryText,\n selectionMode\n}: AriaLabelProps) => {\n return accessibleLabel\n ? accessibleLabel\n : `${isDisabled ? '' : translations.filePicker_addFiles() + '. '}${getPrimaryText(\n primaryText,\n translations\n )}. ${getSecondaryText(secondaryText, translations, selectionMode)}`;\n};\n\n/**\n * Returns the styles of the file picker\n */\nexport const getStyles = (width: FilePickerProps['width'], height: FilePickerProps['height']) => {\n const dimStyles: JSX.CSSProperties = {\n width: width ? sizeToCSS(width) : undefined,\n height: height ? sizeToCSS(height) : undefined\n };\n return dimStyles;\n};\n\n/**\n * Returns the primary text\n */\nconst getPrimaryText = (primaryText: FilePickerProps['primaryText'], translations: BundleType) => {\n return primaryText ? primaryText : translations.filePicker_dropzonePrimaryText();\n};\n\n/**\n * Returns the secondary text text\n */\nconst getSecondaryText = (\n secondaryText: FilePickerProps['secondaryText'],\n translations: BundleType,\n selectionMode: FilePickerProps['selectionMode']\n) => {\n const defaultSecondaryText =\n selectionMode === 'multiple'\n ? translations.filePicker_dropzoneSecondaryTextMultiple()\n : translations.filePicker_dropzoneSecondaryText();\n return secondaryText ? secondaryText : defaultSecondaryText;\n};\n\n/**\n * Takes in a list of files and returns a list of accepted files and\n * a list of rejected files based on file type\n */\nexport const validateTypes = (\n files: FileList,\n accept: FilePickerProps['accept'],\n translations: BundleType\n) => {\n const accepted = [];\n const rejected = [];\n let file: File;\n let type: string;\n if (files) {\n for (let i = 0; i < files.length; i++) {\n file = files[i];\n const name = file.name;\n type = translations.filePicker_unknownFileTypeUploadError();\n if (name) {\n const nameSplit = name.split('.');\n type = nameSplit.length > 1 ? '.' + nameSplit.pop() : type;\n }\n type = file.type ? file.type : type;\n // If type isn't already in one of the lists, add it\n if (accepted.indexOf(type) === -1 && rejected.indexOf(type) === -1) {\n if (_acceptFile(file, accept)) {\n accepted.push(type);\n } else {\n rejected.push(type);\n }\n }\n }\n }\n return { accepted, rejected };\n};\n\n/**\n * Creates a file list\n */\nexport const createFileList = (origList: FileList | DataTransferItemList) => {\n const descriptor: Record<string | number, PropertyDescriptor> = {\n length: { value: origList.length },\n item: {\n value(index: number): File {\n return (this as unknown as FileList)[index];\n }\n }\n };\n for (let i = 0; i < origList.length; i++) {\n descriptor[i] = { value: origList[i], enumerable: true };\n }\n\n return Object.create(FileList.prototype, descriptor);\n};\n\n/**\n * Returns false if selected multiple files when in single file selection mode\n */\nexport const validateSelectionMode = (\n files: FileList,\n selectionMode: FilePickerProps['selectionMode']\n) => {\n return selectionMode !== 'single' || files.length === 1;\n};\n\n/**\n * Returns the correct message if mime type validation has failed\n */\nexport const getMimeTypeValidationMessages = (\n rejected: Array<string>,\n translations: BundleType\n): ComponentMessageItem[] => {\n const messages: ComponentMessageItem[] = [];\n if (rejected.length === 1) {\n messages.push({\n severity: 'error',\n summary: translations.filePicker_singleTypeUploadError({\n fileType: rejected[0]\n })\n });\n } else {\n messages.push({\n severity: 'error',\n summary: translations.filePicker_multipleFileTypeUploadError({\n fileTypes: rejected.join(translations.plural_separator())\n })\n });\n }\n return messages;\n};\n\n/**\n * Returns true if file passes mimetype validation\n */\nconst _acceptFile = (file: File, accept: FilePickerProps['accept']) => {\n const acceptProp = accept;\n if (!acceptProp || acceptProp.length === 0 || !file) {\n return true;\n }\n\n let fileAccept;\n for (let i = 0; i < acceptProp.length; i++) {\n fileAccept = trim(acceptProp[i]) as string;\n if (!fileAccept) {\n return true;\n } else if (fileAccept.startsWith('.', 0)) {\n // when dragover, only MIME type is available, file name is undefined\n // to lowerCase is to make the string comparison case insensitive\n if (!file.name || (file.name && file.name.toLowerCase().endsWith(fileAccept.toLowerCase()))) {\n return true;\n }\n } else if (!file.type) {\n return false;\n } else if (fileAccept === 'image/*') {\n if (file.type.startsWith('image/', 0)) {\n return true;\n }\n } else if (fileAccept === 'video/*') {\n if (file.type.startsWith('video/', 0)) {\n return true;\n }\n } else if (fileAccept === 'audio/*') {\n if (file.type.startsWith('audio/', 0)) {\n return true;\n }\n } else if (file.type === fileAccept) {\n return true;\n }\n }\n return false;\n};\n","import { ComponentMessageItem } from '../UNSAFE_ComponentMessage';\n\nimport { createFileList } from './FilePickerUtils';\nimport { RejectDetail, CommitDetail } from './FilePicker';\n\n/**\n * Calls the onReject callback when invalid files are selected.\n * For invalid dragged files, this function will return a promise resolver that\n * should be called when the invalid files are no longer dragged over the filepicker.\n */\nexport const fireRejectAction = (\n messages: ComponentMessageItem[],\n isDrag: boolean,\n onReject?: (detail: RejectDetail) => void\n) => {\n let resolver;\n const dragPromise = isDrag\n ? new Promise<void>((resolve) => {\n resolver = resolve;\n })\n : null;\n\n onReject?.({\n messages,\n until: dragPromise\n });\n return resolver;\n};\n\n/**\n * Calls the onCommit callback when all files are valid.\n */\nexport const handleFilesAdded = (files: FileList, onCommit?: (detail: CommitDetail) => void) => {\n // Bug 28503874 - filepicker: filelist cleared after the handler returns\n // Note: the parameter \"files\" is a direct reference to the embedded Input element's property\n // which could be reset or changed.\n // we need to return a copy of FileList just in case apps hold on to a reference to FileList\n const list = createFileList(files);\n onCommit?.({\n files: list\n });\n};\n","import { pickFiles } from '../utils/UNSAFE_filePickerUtils';\nimport { getClientHints } from '../utils/PRIVATE_clientHints';\nimport { usePress } from '../hooks/UNSAFE_usePress';\nimport { useHover } from '../hooks/UNSAFE_useHover';\nimport { ComponentMessageItem } from '../UNSAFE_ComponentMessage';\nimport { BundleType } from '../resources/nls/bundle';\n\nimport { FilePicker, CommitDetail, RejectDetail } from './FilePicker';\nimport {\n validateTypes,\n getMimeTypeValidationMessages,\n createFileList,\n validateSelectionMode\n} from './FilePickerUtils';\nimport { fireRejectAction, handleFilesAdded } from './postValidationUtils';\n\nimport { ComponentProps } from 'preact';\nimport { useRef, Ref, StateUpdater } from 'preact/hooks';\n\ntype FilePickerProps = ComponentProps<typeof FilePicker>;\n\ntype FilePickerElementProps = FilePickerProps & {\n translations: BundleType;\n};\n\n/**\n * The file picker helper method for non-disabled filepickers.\n */\nexport const useFilepickerElementHelper = (\n props: FilePickerElementProps,\n rootRef: Ref<HTMLDivElement>,\n setValidity?: StateUpdater<'NA' | 'valid' | 'invalid'>\n) => {\n const { callback, validation } = clickCallbackUtils(props);\n const { pressProps } = usePress(callback);\n\n const dragAndDropProps = useDragAndDropEvents(\n props.accept,\n props.selectionMode,\n fireRejectAction,\n handleFilesAdded,\n rootRef,\n props.translations,\n props.onCommit,\n props.onReject,\n setValidity\n );\n const { hoverProps, isHover } = useHover({ isDisabled: false });\n return {\n validation,\n dragAndDropProps,\n pressProps,\n isHover,\n hoverProps\n };\n};\n\ntype ClickProps = {\n accept?: FilePickerProps['accept'];\n capture?: FilePickerProps['capture'];\n selectionMode?: FilePickerProps['selectionMode'];\n onCommit?: FilePickerProps['onCommit'];\n onReject?: FilePickerProps['onReject'];\n translations: BundleType;\n};\n\nconst clickCallbackUtils = (props: ClickProps) => {\n /**\n * Callback function when the filepicker is clicked.\n */\n const handleSelectingFiles = (event: Event) => {\n // Bug 27775173 - within firefox browser cannot tab past filepicker without file selector\n // window opening\n // only launching the file picker if click or 'Enter' was pressed\n if (\n event.type === 'click' ||\n (event.type === 'keyup' && (event as KeyboardEvent).code === 'Enter')\n ) {\n // Bug 26907138 - form submit event is triggered when the file upload button is clicked\n event.preventDefault();\n\n pickFiles(_handleClickValidation, {\n accept: props.accept,\n selectionMode: props.selectionMode ?? 'multiple',\n capture: props.capture ?? 'none'\n });\n }\n };\n\n /**\n * Handles file validation from selecting files through the file dialog\n */\n const _handleClickValidation = (files: FileList) => {\n if (files.length > 0) {\n const rejected = validateTypes(files, props.accept, props.translations).rejected;\n if (rejected.length > 0) {\n fireRejectAction(\n getMimeTypeValidationMessages(rejected, props.translations),\n false,\n props.onReject\n );\n } else {\n handleFilesAdded(files, props.onCommit);\n }\n }\n };\n return {\n callback: handleSelectingFiles,\n validation: _handleClickValidation\n };\n};\n\nconst useDragAndDropEvents = (\n accept: FilePickerProps['accept'],\n selectionMode: FilePickerProps['selectionMode'],\n fireRejectAction: (\n messages: ComponentMessageItem[],\n isDrag: boolean,\n onReject?: (detail: RejectDetail) => void\n ) => any,\n handleFilesAdded: (files: FileList, onCommit?: (detail: CommitDetail) => void) => void,\n rootRef: Ref<HTMLDivElement>,\n translations: BundleType,\n onCommit?: (detail: CommitDetail) => void,\n onReject?: (detail: RejectDetail) => void,\n // setValidity not set for custom filepicker\n setValidity?: StateUpdater<'NA' | 'valid' | 'invalid'>\n) => {\n const inDropZone = useRef<boolean>(false);\n const isDroppable = useRef<boolean>(false);\n const dragPromiseResolver = useRef<() => void>();\n\n /**\n * Drag Enter handler called when a dragged file enter the filepicker dropzone\n */\n const _handleDragEnter = (event: Event) => {\n event.preventDefault();\n event.stopPropagation();\n };\n\n /**\n * Drag over handler called when a file is dragged over the filepicker\n */\n const _handleDragOver = (event: DragEvent) => {\n event.preventDefault();\n event.stopPropagation();\n if (inDropZone.current) {\n return;\n }\n\n const browser = getClientHints().browser;\n inDropZone.current = true;\n isDroppable.current = true;\n // Safari doesn't provide the data for the files on drag over so validation cannot be done until drop\n if (browser !== 'safari') {\n if (!event.dataTransfer) {\n return;\n }\n const files = createFileList(event.dataTransfer.items);\n let messages = [] as ComponentMessageItem[];\n const selectionModeValid = validateSelectionMode(files, selectionMode);\n const droppable = validateTypes(files, accept, translations);\n if (selectionModeValid && droppable.rejected.length === 0) {\n // validation passes\n setValidity?.('valid');\n } else {\n isDroppable.current = false;\n if (selectionModeValid) {\n // mimetype Validation fails\n messages = getMimeTypeValidationMessages(droppable.rejected, translations);\n } else {\n // selected multiple files in single selection mode\n messages.push({\n severity: 'error',\n summary: translations.filePicker_singleFileUploadError()\n });\n }\n setValidity?.('invalid');\n dragPromiseResolver.current = fireRejectAction(messages, true, onReject);\n }\n } else {\n setValidity?.('valid');\n }\n };\n\n /**\n * Drag leave handler is called when the dragged file leaves the filepicker dropzone\n */\n const _handleDragLeave = (event: DragEvent, mimeTypeDropFail = false) => {\n if (!inDropZone.current) {\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n if (!rootRef.current?.contains(event.relatedTarget as Node)) {\n inDropZone.current = false;\n setValidity?.('NA');\n // There's only a promise if validation failed on dragover\n if (!isDroppable.current && !mimeTypeDropFail) {\n dragPromiseResolver.current?.();\n }\n }\n };\n\n /**\n * Drop file handler is called when a file is dropped on the filepicker dropzone\n */\n const _handleFileDrop = (event: DragEvent) => {\n if (inDropZone.current) {\n event.preventDefault();\n event.stopPropagation();\n if (!event.dataTransfer) {\n inDropZone.current = false;\n return;\n }\n const files = createFileList(event.dataTransfer.files);\n let mimeTypeDropFail = false;\n if (isDroppable.current) {\n let messages: ComponentMessageItem[] = [];\n if (validateSelectionMode(files, selectionMode)) {\n const droppable = validateTypes(files, accept, translations);\n if (droppable.rejected.length > 0) {\n // mimetype Validation fails\n messages = getMimeTypeValidationMessages(droppable.rejected, translations);\n mimeTypeDropFail = true;\n }\n } else {\n messages.push({\n severity: 'error',\n summary: translations.filePicker_singleFileUploadError()\n });\n }\n if (messages.length > 0) {\n isDroppable.current = false;\n fireRejectAction(messages, false, onReject);\n }\n if (isDroppable.current) {\n handleFilesAdded(files, onCommit);\n }\n }\n _handleDragLeave(event, mimeTypeDropFail);\n }\n };\n\n return {\n onDragEnter: _handleDragEnter,\n onDragOver: _handleDragOver,\n onDragLeave: _handleDragLeave,\n onDrop: _handleFileDrop\n };\n};\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * Licensed under The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\nimport { mergeProps } from '../utils/UNSAFE_mergeProps';\nimport { Size } from '../utils/UNSAFE_size';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { useTranslationBundle } from '../hooks/UNSAFE_useTranslationBundle';\nimport type { BundleType } from '../resources/nls/bundle';\nimport { ComponentMessageItem } from '../UNSAFE_ComponentMessage';\nimport { cssProps } from '@oracle/oraclejet-cssprops';\n\nimport { getDefaultTriggerContent, getAriaLabel, getStyles } from './FilePickerUtils';\nimport { useFilepickerElementHelper } from './useFilePickerElement';\n\nimport { ComponentChildren } from 'preact';\nimport { useState, useRef, useImperativeHandle } from 'preact/hooks';\nimport { ForwardedRef } from 'preact/compat';\nimport { useTabbableMode } from '../hooks/UNSAFE_useTabbableMode';\n\n// TODO: Andy's comment below JET-53230\n// The FilePicker supports two very different use cases: default and custom file pickers. Should we consider dropping the wrapper and instead exporting the two underlying components (with the appropriate property types) directly?\n// If not, perhaps we should look into defining the Props type as a discriminated union such that primaryText/secondaryText props are only valid when children is not specified?\n\ntype Props = {\n /**\n * An array of strings of allowed MIME types or file extensions that can be uploaded; this is unlike the accept attribute of the html <input> element that accepts a simple comma-delimited string. If not specified, all file types will be accepted.\n * <p>Note: If accept is specified, files with empty string type will be rejected if no match found in the \"accept\" value. */\n accept?: string[];\n\n /**\n * Specifies the preferred facing mode for the device's\n * <a href=\"https://www.w3.org/TR/html-media-capture/#dom-htmlinputelement-capture\">media capture</a> mechanism;\n * This is most often used to provide direct camera access on mobile devices. Note that the accept attribute must\n * be specified and have an associated capture control type (e.g.[\"image/*\"]) for the capture attribute to take effect. Support may vary by browser.\n *\n */\n capture?: 'user' | 'environment' | 'implementation' | 'none';\n\n /**\n * Disables the filepicker if set to <code class=\"prettyprint\">true</code>.\n */\n isDisabled?: boolean;\n\n /**\n * The primary text for the default file picker.\n */\n primaryText?: string;\n\n /**\n * The secondary text for the default file picker.\n */\n secondaryText?: string;\n /**\n * Whether to allow single or multiple file selection.\n */\n selectionMode?: 'multiple' | 'single';\n\n /**\n * A label to be used for accessibility purposes.\n */\n accessibleLabel?: string;\n\n /**\n * Property that triggers a callback immediately when a set of files have been committed\n */\n onCommit?: (detail: CommitDetail) => void;\n\n /**\n * Property that triggers a callback immediately when a set of files have been rejected\n */\n onReject?: (detail: RejectDetail) => void;\n\n /**\n * Width of the File Picker\n */\n width?: Size;\n\n /**\n * Height of the File Picker\n */\n height?: Size;\n\n /**\n * If the children is provided, its contents replace the default filepicker. Filepicker will still set role and aria-label, but\n * the application is responsible for setting the tabindex.\n */\n children?: ComponentChildren;\n};\n\nexport type CommitDetail = {\n files: FileList;\n};\n\nexport type RejectDetail = {\n /**\n * Messages that should be displayed to the user (e.g. in an oj-messages component) describing rejected files.\n */\n messages: ComponentMessageItem[];\n\n /**\n * This property may be populated with a Promise to provide short-term feedback during a user interaction (typically drag and drop); the feedback should be cleared upon the resolution of this Promise.\n */\n until: Promise<void> | null;\n};\n\n/**\n * A file picker displays a clickable dropzone for selecting files from the device storage.\n */\nexport function FilePicker({\n capture = 'none',\n isDisabled = false,\n selectionMode = 'multiple',\n children,\n ...otherProps\n}: Props) {\n // this ref is added only for testing purposes. Allows the test to directly\n // call certain functions that should be tested\n const testHandlersRef = (otherProps as any).__testHandlerSymbol;\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const props = { capture, selectionMode, translations, ...otherProps };\n if (isDisabled) {\n return <DisabledFilePicker {...props}>{children}</DisabledFilePicker>;\n }\n return children ? (\n <CustomFilePicker testHandlersRef={testHandlersRef} {...props}>\n {children}\n </CustomFilePicker>\n ) : (\n <DefaultFilePicker testHandlersRef={testHandlersRef} {...props} />\n );\n}\n\ntype FilePickerProps = Props & {\n translations: BundleType;\n};\n\ntype DndProps = {\n onDragEnter: (event: Event) => void;\n onDragOver: (event: DragEvent) => void;\n onDragLeave: (event: DragEvent, mimeTypeDropFail: boolean) => void;\n onDrop: (event: DragEvent) => void;\n};\n\nexport type TestHandlersRef = ForwardedRef<\n DndProps & {\n onClickSelected: (files: FileList) => void;\n }\n>;\n\ntype TestHandlerProps = {\n // this ref is populated only in tests\n testHandlersRef?: TestHandlersRef;\n};\n\ntype DefaultProps = Omit<FilePickerProps, 'isDisabled' | 'children'> & TestHandlerProps;\n\n/**\n * The default file picker element.\n */\nconst DefaultFilePicker = (props: DefaultProps) => {\n const [validity, setValidity] = useState<'NA' | 'valid' | 'invalid'>('NA');\n\n // class added to change bg/border color based on if file is valid on drag and drop\n const validityClass =\n validity === 'valid' ? 'oj-c-valid-drop' : validity === 'invalid' ? 'oj-c-invalid-drop' : '';\n const rootRef = useRef<HTMLDivElement>(null);\n\n const { validation, dragAndDropProps, pressProps, isHover, hoverProps } =\n useFilepickerElementHelper(props, rootRef, setValidity);\n const mergedEventProps = mergeProps(pressProps, hoverProps);\n\n // These are backdoor handles that are used for testing purposes only\n useSetupTestRef(dragAndDropProps, validation, props.testHandlersRef || null);\n const classes = classNames([\n styles.base,\n props.width === undefined && styles.maxWidth,\n isHover && styles.hover\n ]);\n const { isTabbable } = useTabbableMode();\n const {\n accessibleLabel,\n primaryText,\n secondaryText,\n translations,\n selectionMode,\n width,\n height\n } = props;\n return (\n <div\n {...mergedEventProps}\n class={classes}\n tabIndex={isTabbable ? 0 : -1}\n role=\"button\"\n aria-label={getAriaLabel({\n accessibleLabel,\n isDisabled: false,\n translations,\n primaryText,\n secondaryText,\n selectionMode\n })}\n ref={rootRef}\n style={getStyles(width, height)}>\n <div class={classNames([styles.inner, validityClass])} {...dragAndDropProps}>\n {getDefaultTriggerContent(false, primaryText, secondaryText, translations, selectionMode)}\n </div>\n </div>\n );\n};\n\ntype DisabledProps = Omit<\n FilePickerProps,\n 'accept' | 'capture' | 'onCommit' | 'onReject' | 'isDisabled'\n>;\n\n/**\n * The disabled file picker element.\n */\nconst DisabledFilePicker = ({\n children,\n accessibleLabel,\n primaryText,\n secondaryText,\n translations,\n selectionMode,\n width,\n height\n}: DisabledProps) => {\n return (\n <div\n class={classNames([\n childrenStyles,\n styles.base,\n styles.inner,\n width === undefined && styles.maxWidth,\n 'oj-c-filepicker-disabled'\n ])}\n role=\"button\"\n aria-label={getAriaLabel({\n accessibleLabel,\n isDisabled: true,\n translations,\n primaryText,\n secondaryText\n })}\n aria-hidden=\"true\"\n style={getStyles(width, height)}>\n {children ||\n getDefaultTriggerContent(true, primaryText, secondaryText, translations, selectionMode)}\n </div>\n );\n};\n\ntype CustomProps = Omit<FilePickerProps, 'isDisabled' | 'primaryText' | 'secondaryText'> &\n TestHandlerProps;\n\n/**\n * The custom file picker element.\n */\nconst CustomFilePicker = (props: CustomProps) => {\n const rootRef = useRef<HTMLDivElement>(null);\n const { validation, dragAndDropProps, pressProps, isHover, hoverProps } =\n useFilepickerElementHelper(props, rootRef);\n const mergedEventProps = mergeProps(pressProps, dragAndDropProps, hoverProps);\n\n // These are backdoor handles that are used for testing purposes only\n useSetupTestRef(dragAndDropProps, validation, props.testHandlersRef || null);\n\n const classes = classNames([\n styles.base,\n props.width === undefined && styles.maxWidth,\n isHover && styles.hover\n ]);\n const { accessibleLabel, translations, selectionMode } = props;\n const { isTabbable } = useTabbableMode();\n return (\n <div\n class={classNames([classes, childrenStyles])}\n tabIndex={isTabbable ? undefined : -1}\n role=\"button\"\n aria-label={getAriaLabel({ accessibleLabel, isDisabled: false, translations, selectionMode })}\n ref={rootRef}\n style={getStyles(props.width, props.height)}\n {...mergedEventProps}>\n {props.children}\n </div>\n );\n};\n\n/**\n * Only called for testing purposes, sets up the test ref that\n * allows for backdoor access to certain methods\n */\nconst useSetupTestRef = (\n dragAndDropProps: DndProps,\n validation: (files: FileList) => void,\n testHandlersRef: TestHandlersRef\n) => {\n useImperativeHandle(testHandlersRef, () => ({\n onDragEnter: dragAndDropProps.onDragEnter,\n onDragOver: dragAndDropProps.onDragOver,\n onDrop: dragAndDropProps.onDrop,\n onDragLeave: dragAndDropProps.onDragLeave,\n onClickSelected: validation\n }));\n};\n\nconst styles = {\n base: cssProps`${{\n display: 'block',\n height: '100%',\n width: '100%'\n }}`,\n maxWidth: cssProps`${{\n maxWidth: '400px'\n }}`,\n inner: cssProps`${{\n justifyContent: 'space-between',\n alignItems: 'center',\n boxSizing: 'border-box',\n borderRadius: 'var(--oj-c-PRIVATE-DO-NOT-USE-file-picker-border-radius)',\n paddingTop: 'var(--oj-c-PRIVATE-DO-NOT-USE-file-picker-padding)',\n paddingRight: 'var(--oj-c-PRIVATE-DO-NOT-USE-file-picker-padding)',\n paddingLeft: 'var(--oj-c-PRIVATE-DO-NOT-USE-file-picker-padding)',\n paddingBottom: 'var(--oj-c-PRIVATE-DO-NOT-USE-file-picker-padding)',\n height: '100%',\n borderStyle: 'dashed',\n borderWidth: 'var(--oj-c-PRIVATE-DO-NOT-USE-file-picker-border-width)',\n backgroundColor: 'var(--oj-c-PRIVATE-DO-NOT-USE-file-picker-bg-color)',\n borderColor: 'var(--oj-c-PRIVATE-DO-NOT-USE-file-picker-border-color)',\n '&:active': { backgroundColor: 'var(--oj-c-PRIVATE-DO-NOT-USE-core-bg-color-active)' }\n }}`,\n hover: cssProps`${{\n // @ts-ignore\n '&:not(:active)': {\n cursor: 'var(--oj-c-PRIVATE-DO-NOT-USE-file-picker-cursor)'\n }\n }}`,\n\n pseudohover: cssProps`${{\n // @ts-ignore\n '@media(hover: hover)': {\n '&:hover:enabled:not(:active)': {\n cursor: 'var(--oj-c-PRIVATE-DO-NOT-USE-file-picker-cursor)'\n }\n }\n }}`\n};\nconst childrenStyles = cssProps`${{\n /* @ts-ignore */\n '& > *': {\n marginTop: '0 !important',\n marginBottom: '0 !important',\n marginLeft: '0 !important',\n marginRight: '0 !important'\n }\n}}`;\n"],"names":["getDefaultTriggerContent","isDisabled","primaryText","secondaryText","translations","selectionMode","_jsx","Text","Object","assign","variant","weight","size","children","getPrimaryText","Spacer","height","jsx","getSecondaryText","getAriaLabel","accessibleLabel","filePicker_addFiles","getStyles","width","sizeToCSS","undefined","filePicker_dropzonePrimaryText","defaultSecondaryText","filePicker_dropzoneSecondaryTextMultiple","filePicker_dropzoneSecondaryText","validateTypes","files","accept","accepted","rejected","file","type","i","length","name","filePicker_unknownFileTypeUploadError","nameSplit","split","pop","indexOf","_acceptFile","push","createFileList","origList","descriptor","value","item","index","this","enumerable","create","FileList","prototype","validateSelectionMode","getMimeTypeValidationMessages","messages","severity","summary","filePicker_singleTypeUploadError","fileType","filePicker_multipleFileTypeUploadError","fileTypes","join","plural_separator","acceptProp","fileAccept","trim","startsWith","toLowerCase","endsWith","fireRejectAction","isDrag","onReject","resolver","dragPromise","Promise","resolve","until","handleFilesAdded","onCommit","list","useFilepickerElementHelper","props","rootRef","setValidity","callback","validation","clickCallbackUtils","pressProps","usePress","dragAndDropProps","useDragAndDropEvents","hoverProps","isHover","useHover","_handleClickValidation","event","code","preventDefault","pickFiles","_a","capture","_b","inDropZone","useRef","isDroppable","dragPromiseResolver","_handleDragLeave","mimeTypeDropFail","current","stopPropagation","contains","relatedTarget","call","onDragEnter","onDragOver","browser","getClientHints","dataTransfer","items","selectionModeValid","droppable","filePicker_singleFileUploadError","onDragLeave","onDrop","DefaultFilePicker","styles","base","maxWidth","isTabbable","useTabbableMode","DisabledFilePicker","class","classNames","inner","role","style","CustomFilePicker","classes","childrenStyles","tabIndex","ref","mergedEventProps","useSetupTestRef","testHandlersRef","useImperativeHandle","onClickSelected","otherProps","__rest","__testHandlerSymbol","useTranslationBundle"],"mappings":"klBAgBO,MAAMA,EAA2B,CACtCC,EACAC,EACAC,EACAC,EACAC,IAEO,CACLC,MAACC,EAAAA,KAAIC,OAAAC,OAAA,CAACC,QAAST,EAAa,WAAa,UAAWU,OAAO,OAAOC,KAAK,MAAI,CAAAC,SACxEC,EAAeZ,EAAaE,MAE/BE,EAAAA,IAACS,EAAMA,OAAA,CAACC,OAAO,SACfV,EAACW,IAAAV,EAAIA,KAACC,OAAAC,OAAA,CAAAC,QAAST,EAAa,WAAa,YAAaW,KAAK,MAAI,CAAAC,SAC5DK,EAAiBf,EAAeC,EAAcC,OAgBxCc,EAAe,EAC1BC,gBAAAA,EACAnB,WAAAA,EACAG,aAAAA,EACAF,YAAAA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,WAAAA,GAAAC,EAAAA,kBACA,OAAAjI,MAAA,MAAAE,OAAAC,OAAA,CAAAgI,MAAAC,EAAAA,WAAA,CAAAK,EAAAC,IAAAC,SAAAX,OAAA7G,GAAA,EAAAmH,KAAA,SAAA,aAAAzH,EAAA,CAAAC,gBAAAA,EAAAnB,YAAA,EAAAG,aAAAA,EAAAC,cAAAA,IAAA6I,IAAA1D,EAAAqD,MAAAvH,EAAAiE,EAAAhE,MAAAgE,EAAAvE,SAAAmI,EAAA,CAAAtI,SAAA0E,EAAA1E,aAkBFuI,EAAA,CAAArD,EAAAJ,EAAA0D,KAKEC,EAAAA,oBAAAD,EAAA,KAAA,6FAKEE,gBAAA5D,MAIJwC,EAAA,MAAA,oBAAA,gBAAA,eAAA,iCAyCAa,EAAA,wBAjPA,SAAAvC,GAA2B,IAAAC,QAAAA,EAAA,OAAAzG,WAAAA,GAAA,EAAAI,cAAAA,EAAA,WAAAQ,SAAAA,GAAA4F,EAAA+C,EAAAC,EAAAA,OAAAhD,EAAA,CAAA,UAAA,aAAA,gBAAA,aASzB,MAAA4C,EAAAG,EAAAE,oBACAtJ,EAAAuJ,uBAAA,0FAEA,OAAA1J,EACEK,EAAAA,IAAAkI,EAAAhI,OAAAC,OAAA,GAAA8E,EAAA,CAAA1E,SAAAA,KAEFA,EAAAP,EAAAW,IAAA6H,EAAAtI,OAAAC,OAAA,CAAA4I,gBAAAA,GAAA9D,EAAA,CAAA1E,SAAAA,KAAAP,EAAAW,IAAAiH,EAAA1H,OAAAC,OAAA,CAAA4I,gBAAAA,GAAA9D"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
define(["exports","./tslib.es6-d809b4dd","preact/jsx-runtime","./utils/UNSAFE_interpolations/dimensions","./utils/UNSAFE_mergeInterpolations",'module',"./utils/UNSAFE_interpolations/boxalignment","./utils/UNSAFE_interpolations/flexbox","./utils/UNSAFE_interpolations/flexitem","./utils/UNSAFE_classNames","./flexbox-83e878b1","./flexitem-c406a7bb","./classNames-f9dd69a8"],function(e,s,t,i,n,l,a,o,r,c,b,x,u){"use strict";const d=[...Object.values(i.dimensionInterpolations),...Object.values(b.flexboxInterpolations),...Object.values(x.flexitemInterpolations),...Object.values(a.boxAlignmentInterpolations)],m=n.mergeInterpolations(d);e.Flex=e=>{var{children:i,hasZeroMargins:n}=e,l=s.__rest(e,["children","hasZeroMargins"]);const a=u.classNames(["_1n27dne",n&&"_1phb6i8"]),o=m(l),{class:r}=o,c=s.__rest(o,["class"]);return t.jsx("div",Object.assign({class:`${a} ${r}`,style:c},{children:i}))}});
|
|
2
|
+
//# sourceMappingURL=Flex-343c337e.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Flex-
|
|
1
|
+
{"version":3,"file":"Flex-343c337e.js","sources":["../../src/UNSAFE_Flex/Flex.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * Licensed under The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\nimport { ComponentChildren } from 'preact';\nimport { dimensionInterpolations } from '../utils/UNSAFE_interpolations/dimensions';\nimport type { DimensionProps } from '../utils/UNSAFE_interpolations/dimensions';\nimport { mergeInterpolations } from '../utils/UNSAFE_mergeInterpolations';\nimport { cssProps } from '@oracle/oraclejet-cssprops';\nimport { boxAlignmentInterpolations } from '../utils/UNSAFE_interpolations/boxalignment';\nimport type { BoxAlignmentProps } from '../utils/UNSAFE_interpolations/boxalignment';\nimport { flexboxInterpolations } from '../utils/UNSAFE_interpolations/flexbox';\nimport type { FlexboxProps } from '../utils/UNSAFE_interpolations/flexbox';\nimport { flexitemInterpolations } from '../utils/UNSAFE_interpolations/flexitem';\nimport type { FlexitemProps } from '../utils/UNSAFE_interpolations/flexitem';\nimport { classNames } from '../utils/UNSAFE_classNames';\n\ntype StyleProps = DimensionProps & FlexboxProps & FlexitemProps & BoxAlignmentProps;\n\ntype Props = StyleProps & {\n children?: ComponentChildren;\n hasZeroMargins?: boolean;\n};\n\nconst baseStyles = cssProps`${{ display: 'flex' }}`;\nconst marginZeroStyles = cssProps`${{\n /* @ts-ignore */\n '& > *': {\n marginTop: '0 !important',\n marginBottom: '0 !important',\n marginLeft: '0 !important',\n marginRight: '0 !important'\n }\n}}`;\n\nconst interpolations = [\n ...Object.values(dimensionInterpolations),\n ...Object.values(flexboxInterpolations),\n ...Object.values(flexitemInterpolations),\n ...Object.values(boxAlignmentInterpolations)\n];\n\nconst styleInterpolations = mergeInterpolations<Props>(interpolations);\n\nexport const Flex = ({ children, hasZeroMargins, ...props }: Props) => {\n const flexComponentClasses = classNames([baseStyles, hasZeroMargins && marginZeroStyles]);\n const { class: cls, ...styles } = styleInterpolations(props);\n return (\n <div class={`${flexComponentClasses} ${cls}`} style={styles}>\n {children}\n </div>\n );\n};\n"],"names":["interpolations","Object","values","dimensionInterpolations","flexboxInterpolations","flexitemInterpolations","boxAlignmentInterpolations","styleInterpolations","mergeInterpolations","_a","flexComponentClasses","classNames","hasZeroMargins","_b","props","class","cls","styles","__rest","_jsx","assign","style","children"],"mappings":"uaA2BA,MAWAA,EAAA,IACEC,OAAAC,OAAAC,EAAAA,4BACAF,OAAAC,OAAAE,EAAAA,0BACAH,OAAAC,OAAAG,6BACAJ,OAAAC,OAAAI,EAAAA,6BAGFC,EAAAC,EAAAA,oBAAAR,UAEAS,mFACE,MAAAC,EAAAC,EAAAA,WAAA,CArBF,WAqBEC,GApBF,aAqBEC,EAAAN,EAAAO,IAAAC,MAAAC,GAAAH,EAAAI,EAAAC,EAAAA,OAAAL,EAAA,CAAA,UACA,OAAAM,MAAA,MAAAlB,OAAAmB,OAAA,CAAAL,MAAA,GAAAL,KAAAM,IAAAK,MAAAJ,GAAA,CAAAK,SAAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
define(["exports","preact/jsx-runtime","preact/hooks","preact/compat","./index-
|
|
2
|
-
//# sourceMappingURL=Floating-
|
|
1
|
+
define(["exports","preact/jsx-runtime","preact/hooks","preact/compat","./index-c61f0d48","./utils/PRIVATE_refUtils","./hooks/UNSAFE_useOutsideClick","./hooks/UNSAFE_useUser"],function(t,e,i,n,o,s,r,l){"use strict";const a=n.forwardRef(({},t)=>e.jsxs("div",Object.assign({ref:t},{children:[" ",e.jsx("div",{})," "]})));const c=n.forwardRef(({children:t,onClickOutside:n,placement:c="bottom",anchorRef:d,offsetValue:u,class:f,tail:p="none",flipOptions:h={mainAxis:!0,crossAxis:!1},shiftOptions:m={mainAxis:!0,crossAxis:!1},sizeOptions:g={isMaxHeightAdjusted:!1,isMaxWidthAdjusted:!1},boundaryOptions:x={padding:0},onPosition:b},A)=>{const v=i.useRef(null),[j,y]=i.useState(null);i.useLayoutEffect(()=>{y(d.current)},[]),d.current!==j&&y(d.current);const{direction:O}=l.useUser(),M="rtl"===O,R=i.useCallback(t=>{!function(t,e,i,n,o){var s,r;if("simple"===n&&t.arrow){const{x:n,y:l,centerOffset:a}=t.arrow,c=i.current,d=7,u=6,f=null===(s=i.current)||void 0===s?void 0:s.querySelector("div"),p=5,h=5,m={position:"absolute",width:"0px",height:"0px"};let g=0,x=0;const b=e.current,A=void 0===(null==b?void 0:b.x)&&void 0===(null==b?void 0:b.y);A&&(g=Math.round(b.getBoundingClientRect().height),x=Math.round(null===(r=e.current)||void 0===r?void 0:r.getBoundingClientRect().width));const v=A?Math.abs(a)>=g/2-d/2:["start-top-corner","start-bottom-corner","end-top-corner","end-bottom-corner"].includes(t.origPlacement),j=A?Math.abs(a)>=x/2-d/2:["top-start-corner","top-end-corner","bottom-start-corner","bottom-end-corner"].includes(t.origPlacement),y=0===a,O=a>0;function M(t){const e=t?u:d;k({borderTop:`${C(e)} solid rgba(var(--oj-c-PRIVATE-DO-NOT-USE-palette-neutral-rgb-90), 0.1)`,borderRight:$(e),borderLeft:$(e)});const i=t?h:p;w({borderTop:`${C(i)} solid var(--oj-c-PRIVATE-DO-NOT-USE-popup-bg-color)`,borderRight:`${$(i)}`,borderLeft:`${$(i)}`})}function R(t,e){Object.assign(null==e?void 0:e.style,t)}function k(t){R(t,c)}function w(t){R(t,f)}function E(t){return`rotate(${45*t}deg)`}function C(t){return`${t}px`}function $(t){return`${C(t)} solid transparent`}switch(R(m,c),R(m,f),M(v||j),t.placement.split("-")[0]){case"top":P();break;case"end":o?H():T();break;case"bottom":U();break;case"start":o?T():H()}function P(){null!=n&&(j?(k({top:"",bottom:C(2-d),left:C(n+(O?5:-5)),transform:E(O?5:3)}),S()):(k({top:"",bottom:C(-d),left:C(y?n:n+(O?1:-1)),transform:E(0)}),W()))}function T(){null!=l&&(v?(k({top:C(l+(O?2:-2)),right:"",left:C(-d-1),transform:E(O?7:5)}),S()):(k({top:C(y?l:l+(O?-2:2)),right:"",left:C(1.5*-d),transform:E(2)}),W()))}function U(){null!=n&&(j?(k({top:C(3-d),bottom:"",left:C(n+(O?4:-4)),transform:E(O?2:6)}),w({top:C(-p),left:C((O?1:-1)-p)})):(k({top:C(-d),bottom:"",left:C(y?n:n+(O?1:-1)),transform:E(4)}),W()))}function H(){null!=l&&(v?(k({top:C(l+(O?2:-2)),right:C(-d-1),left:"",transform:E(O?1:3)}),w({top:C(-p),left:C((O?-2:2)-p)})):(k({top:C(y?l:l+(O?-2:2)),right:C(1.5*-d),left:"",transform:E(6)}),W()))}function S(){w({top:C(-p),left:C((O?2:-2)-p)})}function W(){w({top:C(-p-2),left:C(-p)})}}}(t,d,v,p,M),null==b||b(t)},[c,d,v,p,b]),k=[o.offset(u),o.b({mainAxis:h.mainAxis,crossAxis:h.crossAxis,padding:x.padding}),o.D({mainAxis:m.mainAxis,crossAxis:m.crossAxis,limiter:o.L({mainAxis:m.mainAxis,crossAxis:m.crossAxis})}),...v.current?[o.m({element:v.current})]:[]];(g.isMaxHeightAdjusted||g.isMaxWidthAdjusted)&&k.push(o.k({apply({availableWidth:t,availableHeight:e,elements:i}){g.isMaxHeightAdjusted&&Object.assign(i.floating.style,{maxHeight:`${Math.min(e,g.maxHeightCeiling||e)}px`}),g.isMaxWidthAdjusted&&Object.assign(i.floating.style,{maxWidth:`${Math.min(t,g.maxWidthCeiling||t)}px`})},padding:x.padding}));const{x:w,y:E,reference:C,floating:$,refs:P}=o.useFloating({placement:c,middleware:k,whileElementsMounted:o.N,onPosition:R});r.useOutsideClick({isDisabled:!1,ref:P.floating,handler:n}),i.useLayoutEffect(()=>{if(j instanceof Element){return void C(j)}const t=j,e={getBoundingClientRect:()=>({width:0,height:0,x:t.x,y:t.y,top:t.y,left:t.x,right:t.x,bottom:t.y})};t&&null!=t.x&&C(e)},[j,C]);const T=i.useMemo(()=>s.mergeRefs(A,$),[A,$]);return e.jsxs("div",Object.assign({class:f,ref:T,style:{display:"block",visibility:null==w&&null==E?"hidden":"visible",position:"absolute",top:null!=E?E:"",left:null!=w?w:"",width:"auto",height:"auto"}},{children:[t,e.jsx(a,{ref:v})]}))});t.Floating=c});
|
|
2
|
+
//# sourceMappingURL=Floating-f251f4e6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Floating-0d08c31b.js","sources":["../../src/UNSAFE_Floating/FloatingTail.tsx","../../src/UNSAFE_Floating/Floating.tsx"],"sourcesContent":["import { forwardRef } from 'preact/compat';\nimport { RefObject } from 'preact';\nimport { PositionData, Coords } from '../hooks/UNSAFE_useFloating';\n\nconst FloatingTail = forwardRef<HTMLDivElement>(({}, arrowRef) => {\n return (\n <div ref={arrowRef}> {/*Outer arrow - shadow*/}\n <div></div> {/*Inner arrow - body*/}\n </div>\n );\n});\n\nfunction renderTail(\n data: PositionData,\n anchorRef: RefObject<Element | Coords>,\n arrowRef: RefObject<Element>,\n tail: 'none' | 'simple',\n isRtl: boolean\n) {\n if (tail === 'simple' && data.arrow) {\n const { x, y, centerOffset } = data.arrow;\n const arrowEl = arrowRef.current as Element;\n const arrowSize = 7;\n const arrowSizeCorner = 6;\n const arrowInnerEl = arrowRef.current?.querySelector('div') as Element;\n const arrowInnerSize = 5;\n const arrowInnerSizeCorner = 5;\n const arrowCommonStyle = {\n position: 'absolute',\n width: '0px',\n height: '0px'\n };\n let anchorRefHeight = 0;\n let anchorRefWidth = 0;\n const current = anchorRef.current;\n\n // @ts-ignore. Type 'Element | Coords' issues\n // Property 'x' does not exist on type 'Element'.\n // Property 'y' does not exist on type 'Element'.\n const isAnchorRefElement = current?.x === undefined && current?.y === undefined;\n if (isAnchorRefElement) {\n // @ts-ignore. Property 'getBoundingClientRect' does not exist on type 'Coords'.\n anchorRefHeight = Math.round(current.getBoundingClientRect().height);\n // @ts-ignore. Property 'getBoundingClientRect' does not exist on type 'Coords'.\n anchorRefWidth = Math.round(anchorRef.current?.getBoundingClientRect().width);\n }\n const isCornerVerticalPlacement = isAnchorRefElement ?\n Math.abs(centerOffset) >= anchorRefHeight / 2 - arrowSize / 2 :\n ['start-top-corner', 'start-bottom-corner', 'end-top-corner', 'end-bottom-corner'].includes(data.origPlacement);\n const isCornerHorizontalPlacement = isAnchorRefElement ?\n Math.abs(centerOffset) >= anchorRefWidth / 2 - arrowSize / 2 :\n ['top-start-corner', 'top-end-corner', 'bottom-start-corner', 'bottom-end-corner'].includes(data.origPlacement);\n const isCenter = centerOffset === 0;\n const isCenterOffsetPositive = centerOffset > 0;\n\n // Set styles of the arrow\n setElementStyle(arrowCommonStyle, arrowEl);\n setElementStyle(arrowCommonStyle, arrowInnerEl);\n\n // Set sizes of the arrow\n setArrowSizes(isCornerVerticalPlacement || isCornerHorizontalPlacement);\n\n // Corner vs. normal arrow\n function setArrowSizes(isCornerPlacement?: boolean) {\n // Outer arrow (shadow)\n const arrowFinalSize = isCornerPlacement ? arrowSizeCorner : arrowSize;\n setArrowStyle({\n borderTop: `${getSize(arrowFinalSize)} solid rgba(var(--oj-c-PRIVATE-DO-NOT-USE-palette-neutral-rgb-90), 0.1)`,\n borderRight: getTransparentBorder(arrowFinalSize),\n borderLeft: getTransparentBorder(arrowFinalSize)\n });\n // Inner arrow\n const arrowInnerFinalSize = isCornerPlacement ? arrowInnerSizeCorner : arrowInnerSize;\n setArrowInnerStyle({\n borderTop: `${getSize(arrowInnerFinalSize)} solid var(--oj-c-PRIVATE-DO-NOT-USE-popup-bg-color)`,\n borderRight: `${getTransparentBorder(arrowInnerFinalSize)}`,\n borderLeft: `${getTransparentBorder(arrowInnerFinalSize)}`,\n })\n }\n\n function setElementStyle(style: object, element: Element) {\n //@ts-ignore - regarding types arrowEl.style is not under our control\n Object.assign(element?.style, style);\n }\n\n function setArrowStyle(style: object) {\n setElementStyle(style, arrowEl);\n }\n\n function setArrowInnerStyle(style: object) {\n setElementStyle(style, arrowInnerEl);\n }\n\n function getTurn(eighth: number) {\n return `rotate(${(eighth) * 45}deg)`;\n }\n\n function getSize(size: number) {\n return `${size}px`;\n }\n\n function getTransparentBorder(size: number) {\n return `${getSize(size)} solid transparent`;\n }\n\n const placementArr = data.placement.split('-');\n const side = placementArr[0];\n\n switch(side) {\n case 'top': setArrowTop(); break;\n case 'end': isRtl ? setArrowStart() : setArrowEnd();break;\n case 'bottom': setArrowBottom(); break;\n case 'start': isRtl ? setArrowEnd() : setArrowStart(); break;\n }\n\n function setArrowTop() {\n if (x != undefined) {\n if (isCornerHorizontalPlacement) {\n // Top corners\n setArrowStyle({\n top: '', // flip 'reset'\n bottom: getSize(-arrowSize + 2),\n left: getSize(x + (isCenterOffsetPositive ? 5 : -5)),\n transform: getTurn(isCenterOffsetPositive ? 5 : 3)\n });\n setCornerArrowInner();\n } else {\n setArrowStyle({\n top: '', // flip 'reset'\n bottom: getSize(-arrowSize),\n left: isCenter ? getSize(x) : getSize(x + (isCenterOffsetPositive ? 1 : -1)),\n transform: getTurn(0)\n });\n setNonCornerArrowInner();\n }\n }\n }\n\n function setArrowEnd() {\n if (y != undefined) {\n if (isCornerVerticalPlacement) {\n // End corners\n setArrowStyle({\n top: getSize(y + (isCenterOffsetPositive ? 2 : -2)),\n right: '', // flip 'reset'\n left: getSize(-arrowSize -1),\n transform: getTurn(isCenterOffsetPositive ? 7 : 5)\n });\n setCornerArrowInner();\n } else {\n // End\n setArrowStyle({\n top: isCenter ? getSize(y) : getSize(y + (isCenterOffsetPositive ? -2 : +2)),\n right: '', // flip 'reset'\n left: getSize(-arrowSize * 1.5),\n transform: getTurn(2)\n });\n setNonCornerArrowInner();\n }\n }\n }\n\n function setArrowBottom() {\n if (x != undefined) {\n if (isCornerHorizontalPlacement) {\n // Bottom corners\n setArrowStyle({\n top: getSize(-arrowSize + 3),\n bottom: '', // flip 'reset'\n left: getSize(x + (isCenterOffsetPositive ? 4 : -4)),\n transform: getTurn(isCenterOffsetPositive ? 2 : 6)\n });\n setArrowInnerStyle({\n top: getSize(-arrowInnerSize),\n left: getSize(-arrowInnerSize + (isCenterOffsetPositive ? 1 : -1))\n });\n } else {\n setArrowStyle({\n top: getSize(-arrowSize),\n bottom: '', // flip 'reset'\n left: isCenter ? getSize(x) : getSize(x + (isCenterOffsetPositive ? 1 : -1)),\n transform: getTurn(4)\n });\n setNonCornerArrowInner();\n }\n }\n }\n\n function setArrowStart() {\n if (y != undefined) {\n if (isCornerVerticalPlacement) {\n // Start corners\n setArrowStyle({\n top: getSize(y + (isCenterOffsetPositive ? 2 : -2)),\n right: getSize(-arrowSize - 1),\n left: '', // flip 'reset'\n transform: getTurn(isCenterOffsetPositive ? 1 : 3)\n });\n setArrowInnerStyle({\n top: getSize(-arrowInnerSize),\n left: getSize(-arrowInnerSize + (isCenterOffsetPositive ? -2 : 2))\n });\n } else {\n // Start\n setArrowStyle({\n top: isCenter ? getSize(y) : getSize(y + (isCenterOffsetPositive ? -2 : +2)),\n right: getSize(-arrowSize * 1.5),\n left: '', // flip 'reset'\n transform: getTurn(6)\n });\n setNonCornerArrowInner();\n }\n }\n }\n\n function setCornerArrowInner() {\n setArrowInnerStyle({\n top: getSize(-arrowInnerSize),\n left: getSize(-arrowInnerSize + (isCenterOffsetPositive ? 2 : -2))\n });\n }\n\n function setNonCornerArrowInner() {\n setArrowInnerStyle({\n top: getSize(-arrowInnerSize - 2),\n left: getSize(-arrowInnerSize)\n });\n }\n }\n}\n\nexport { FloatingTail, renderTail };\n","import { RefObject } from 'preact';\nimport { useLayoutEffect, useMemo, useState, useRef, useCallback } from 'preact/hooks';\nimport { forwardRef, ForwardedRef } from 'preact/compat';\nimport { autoUpdate, arrow } from '@floating-ui/dom';\nimport {\n useFloating,\n shift,\n flip,\n size,\n offset,\n limitShift,\n PositionData\n} from '../hooks/UNSAFE_useFloating';\nimport { mergeRefs } from '../utils/PRIVATE_refUtils';\nimport { Offset, Placement, Coords, VirtualElement, Rect } from '../hooks/UNSAFE_useFloating';\nimport { useOutsideClick } from '../hooks/UNSAFE_useOutsideClick';\nimport { HTMLAttributesSignalExcluded } from '../utils/UNSAFE_attributeUtils';\nimport { useUser } from '../hooks/UNSAFE_useUser';\nimport { FloatingTail, renderTail } from './FloatingTail';\n\ntype IntrinsicProps = Pick<HTMLAttributesSignalExcluded<HTMLDivElement>, 'children' | 'class'>;\n\ntype FlipOptions = {\n mainAxis?: boolean; // This is the main axis in which overflow is checked to perform a flip. Default true.\n crossAxis?: boolean; // This is the cross axis in which overflow is checked to perform a flip, the opposite axis of mainAxis. Default false.\n};\n\ntype ShiftOptions = {\n mainAxis?: boolean; // This is the main axis in which shifting is applied. Default true.\n crossAxis?: boolean; // This is the cross axis in which shifting is applied, the opposite axis of mainAxis. Default false\n};\n\n/**\n * This describes the virtual padding around the collision boundary (currently the view port).\n * This could be extended in the future,\n * i.e. property to define what is a boundary ( a view port, a document, some other html element)\n */\nexport type BoundaryOptions = {\n padding?: number | {\n top: number;\n right: number;\n bottom: number;\n left: number;\n };\n}\n/**\n * Specifies the resizing behaviour for max-height and max-width of the floating component.\n * The floating element will change the size depending on the available space.\n * isMaxHeightAdjusted/isMaxWidthAdjusted - sets the max-height/max-width of the floating to the available space till the collision.\n * maxHeightCeiling/maxWidthCeiling - this is the limit for max-height/max-width that should not be exceeded, even if there is more available space till the collision.\n */\nexport type SizeOptions = {\n isMaxWidthAdjusted?: boolean;\n isMaxHeightAdjusted?: boolean;\n maxHeightCeiling?: number;\n maxWidthCeiling?: number;\n}\n\ntype Props = IntrinsicProps & {\n /**\n * Placement of the floating element relative to the trigger.\n * Possible values are:\n * <p> <code>'top' </code> <code>'top-start' </code> <code> 'top-end' </code> <code> 'top-start-corner' </code> <code> 'top-end-corner' </code>\n * <code> 'end' </code> <code> 'end-top' </code> <code> 'end-bottom' </code> <code> 'end-top-corner' </code> <code> 'end-bottom-corner' </code>\n * <code> 'bottom' </code> <code> 'bottom-start' </code> <code> 'bottom-end' </code> <code> 'bottom-start-corner' </code> <code> 'bottom-end-corner' </code>\n * <code> 'start' </code> <code> 'start-top' </code> <code> 'start-bottom' </code> <code> 'start-top-corner' </code> <code> 'start-bottom-corner' </code>\n * </p>\n */\n placement?: Placement;\n\n /**\n * Trigger element reference.\n */\n anchorRef: RefObject<Element | Coords>;\n\n /**\n * Placement offset.\n * Offset displaces the floating element from its core placement along the specified axes.\n * Offset could be a number, object or a function.\n * A number represents the distance (gutter or margin) between the floating element and the reference element.\n * This is shorthand for mainAxis.\n * <pre>\n * {\n * mainAxis?: number;\n * crossAxis?: number;\n * }\n * </pre>\n * <p><code>mainAxis</code> represents the distance (gutter or margin) between the floating element and the reference element.</p>\n * <p><code>crossAxis</code> represents the shifting between the floating element and the reference element.<p>\n * You may also pass a function which returns the previously listed values — this enables you to read the dimensions of the reference or floating elements and the current placement.\n * <pre>\n * (args: {\n * floating: Rect;\n * reference: Rect;\n * placement: Placement;\n * }) => OffsetValue\n * </pre>\n */\n offsetValue?: Offset;\n\n /**\n * Click outside callback.\n */\n onClickOutside?: (event: MouseEvent) => void;\n\n /**\n * Specifies the flipping behavior along the respective axis.\n * When true, the floating element will be flipped to prevent overflow.\n * Default values are 'true' for mainAxis and 'false' for crossAxis.\n */\n flipOptions?: FlipOptions;\n\n /**\n * Specifies the shift behavior along the respective axis.\n * When true, the floating element will shift to prevent overflow.\n * Default values are 'true' for mainAxis and 'false' for crossAxis.\n */\n shiftOptions?: ShiftOptions;\n\n /**\n * Triggered when placement or coordinates are changed after collision is detected\n */\n onPosition?: (data: PositionData) => void;\n\n /**\n * Tail\n */\n tail?: 'none' | 'simple';\n\n /**\n * Specifies the resizing behaviour for height and width of the floating component.\n * When either of the options isMaxHeightAdjusted, isMaxWidthAdjusted is true, the floating element will change the size depending on the available space.\n * Default values are 'false'.\n * maxHeightCeiling and maxWidthCeiling are maximal values that could not be exceeded.\n * Default are undefined and it means to use full available width/height.\n */\n sizeOptions?: SizeOptions;\n\n /**\n * This describes the virtual padding around the collision boundary to check for overflow.\n * Default value for padding is 0.\n */\n boundaryOptions?: BoundaryOptions;\n};\n\nfunction isElement(value: any): value is Element {\n return value instanceof Element;\n}\n/**\n * A floating component allows the user to create a floating element that is displayed on the the \"top layer\" of all other elements.\n * The Floating component is an advanced component and is used underneath Popup, Tooltip, SelectMultiple, Menu and other components.\n */\nexport const Floating = forwardRef(\n (\n {\n children,\n onClickOutside,\n placement = 'bottom',\n anchorRef,\n offsetValue,\n class: className,\n tail = 'none',\n flipOptions = { mainAxis: true, crossAxis: false },\n shiftOptions = { mainAxis: true, crossAxis: false },\n sizeOptions = { isMaxHeightAdjusted: false, isMaxWidthAdjusted: false },\n boundaryOptions = { padding: 0 },\n onPosition\n }:\n Props,\n ref: ForwardedRef<HTMLElement | null>\n ) => {\n const arrowRef = useRef<HTMLDivElement>(null);\n\n const [previousAnchor, setPreviousAnchor] = useState<Element | Coords | null>(null);\n\n // we need to be sure anchorRef.current exists in first call\n // to be able to set the previousAnchor state\n useLayoutEffect(() => {\n setPreviousAnchor(anchorRef.current);\n }, []);\n\n // In case anchorRef.current changes and we need to update floating position\n // when it changes, we need to have copy in the state.\n // For example when anchorRef is Coords( virtual element)\n if (anchorRef.current !== previousAnchor) {\n setPreviousAnchor(anchorRef.current);\n }\n\n const { direction } = useUser();\n const isRtl = direction === 'rtl';\n\n\n const _onPosition = useCallback(\n (data: PositionData) => {\n renderTail(data, anchorRef, arrowRef, tail, isRtl);\n onPosition?.(data);\n },\n [placement, anchorRef, arrowRef, tail, onPosition]\n );\n\n const middleware = [\n offset(offsetValue),\n flip({\n mainAxis: flipOptions.mainAxis,\n crossAxis: flipOptions.crossAxis,\n padding: boundaryOptions.padding\n }),\n shift({\n mainAxis: shiftOptions.mainAxis,\n crossAxis: shiftOptions.crossAxis,\n limiter: limitShift({\n mainAxis: shiftOptions.mainAxis,\n crossAxis: shiftOptions.crossAxis\n })\n }),\n ...(arrowRef.current\n ? [\n arrow({\n element: arrowRef.current\n })\n ]\n : [])\n ];\n if (sizeOptions.isMaxHeightAdjusted || sizeOptions.isMaxWidthAdjusted ) {\n middleware.push(\n size({\n apply({ availableWidth, availableHeight, elements }) {\n if (sizeOptions.isMaxHeightAdjusted) {\n Object.assign(elements.floating.style, {\n maxHeight: `${Math.min(availableHeight, sizeOptions.maxHeightCeiling || availableHeight)}px`\n });\n }\n if (sizeOptions.isMaxWidthAdjusted) {\n Object.assign(elements.floating.style, {\n maxWidth: `${Math.min(availableWidth, sizeOptions.maxWidthCeiling || availableWidth)}px`,\n });\n }\n },\n\n padding: boundaryOptions.padding\n }));\n }\n\n const { x, y, reference, floating, refs } = useFloating({\n placement: placement,\n middleware: middleware,\n whileElementsMounted: autoUpdate,\n onPosition: _onPosition\n });\n\n useOutsideClick({ isDisabled: false, ref: refs.floating, handler: onClickOutside });\n\n useLayoutEffect(() => {\n if (isElement(previousAnchor)) {\n const element = previousAnchor as Element;\n reference(element);\n return;\n }\n const coords = previousAnchor as Coords;\n const virtualEl: VirtualElement = {\n getBoundingClientRect() {\n return {\n width: 0,\n height: 0,\n x: coords!.x,\n y: coords!.y,\n top: coords!.y,\n left: coords!.x,\n right: coords!.x,\n bottom: coords!.y\n };\n }\n };\n if (coords && coords.x != null) {\n reference(virtualEl);\n }\n }, [previousAnchor, reference]);\n\n const stableRef = useMemo(() => mergeRefs(ref, floating), [ref, floating]);\n const content = (\n <div\n class={className}\n ref={stableRef}\n style={{\n display: 'block',\n visibility: x == null && y == null ? 'hidden' : 'visible',\n position: 'absolute',\n top: y ?? '',\n left: x ?? '',\n width: 'auto',\n height: 'auto'\n }}>\n {children}\n <FloatingTail ref={arrowRef} />\n </div>\n );\n return content;\n }\n);\n\nexport { Offset, Placement, Coords, Rect, FlipOptions, ShiftOptions, PositionData };\n"],"names":["FloatingTail","forwardRef","arrowRef","_jsxs","ref","children","_jsx","Floating","onClickOutside","placement","anchorRef","offsetValue","class","className","tail","flipOptions","mainAxis","crossAxis","shiftOptions","sizeOptions","isMaxHeightAdjusted","isMaxWidthAdjusted","boundaryOptions","padding","onPosition","useRef","previousAnchor","setPreviousAnchor","useState","useLayoutEffect","current","direction","useUser","isRtl","_onPosition","useCallback","data","arrow","x","y","centerOffset","arrowEl","arrowSize","arrowSizeCorner","arrowInnerEl","_a","querySelector","arrowInnerSize","arrowInnerSizeCorner","arrowCommonStyle","position","width","height","anchorRefHeight","anchorRefWidth","isAnchorRefElement","undefined","Math","round","getBoundingClientRect","_b","isCornerVerticalPlacement","abs","includes","origPlacement","isCornerHorizontalPlacement","isCenter","isCenterOffsetPositive","setArrowSizes","isCornerPlacement","arrowFinalSize","setArrowStyle","borderTop","getSize","borderRight","getTransparentBorder","borderLeft","arrowInnerFinalSize","setArrowInnerStyle","setElementStyle","style","element","Object","assign","getTurn","eighth","size","split","setArrowTop","setArrowStart","setArrowEnd","setArrowBottom","top","bottom","left","transform","setCornerArrowInner","setNonCornerArrowInner","right","renderTail","middleware","offset","flip","shift","limiter","limitShift","push","apply","availableWidth","availableHeight","elements","floating","maxHeight","min","maxHeightCeiling","maxWidth","maxWidthCeiling","reference","refs","useFloating","whileElementsMounted","autoUpdate","N","useOutsideClick","isDisabled","handler","Element","coords","virtualEl","stableRef","useMemo","mergeRefs","display","visibility"],"mappings":"sNAIA,MAAMA,EAAeC,EAAUA,WAAiB,IAAKC,IAEjDC,EAAAA,0BAAKC,IAAKF,GACR,CAAA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,CACrCmC,SAAU,GAAG1D,KAAKwD,IAAIL,EAAgBzF,EAAYiG,iBAAmBR,UAK3ErF,QAASD,EAAgBC,WAI/B,MAAMe,EAAEA,EAACC,EAAEA,EAAC8E,UAAEA,EAASN,SAAEA,EAAQO,KAAEA,GAASC,cAAY,CACtD9G,UAAWA,EACX2F,WAAYA,EACZoB,qBAAsBC,EAAUC,EAChClG,WAAYU,IAGdyF,kBAAgB,CAAEC,YAAY,EAAOxH,IAAKkH,EAAKP,SAAUc,QAASrH,IAElEqB,EAAAA,gBAAgB,KACd,GAAcH,aA3GMoG,QA2GW,CAG7B,YADAT,EADgB3F,GAIlB,MAAMqG,EAASrG,EACTsG,EAA4B,CAChCrE,sBAAqB,KACZ,CACLR,MAAO,EACPC,OAAQ,EACRd,EAAGyF,EAAQzF,EACXC,EAAGwF,EAAQxF,EACXqD,IAAKmC,EAAQxF,EACbuD,KAAMiC,EAAQzF,EACd4D,MAAO6B,EAAQzF,EACfuD,OAAQkC,EAAQxF,KAIlBwF,GAAsB,MAAZA,EAAOzF,GACnB+E,EAAUW,IAEX,CAACtG,EAAgB2F,IAEpB,MAAMY,EAAYC,UAAQ,IAAMC,YAAU/H,EAAK2G,GAAW,CAAC3G,EAAK2G,IAkBhE,OAhBE5G,EAAAA,KAAA,MAAA+E,OAAAC,OAAA,CACEvE,MAAOC,EACPT,IAAK6H,EACLjD,MAAO,CACLoD,QAAS,QACTC,WAAiB,MAAL/F,GAAkB,MAALC,EAAY,SAAW,UAChDW,SAAU,WACV0C,IAAKrD,MAAAA,EAAAA,EAAK,GACVuD,KAAMxD,MAAAA,EAAAA,EAAK,GACXa,MAAO,OACPC,OAAQ,SAER,CAAA/C,SAAA,CAAAA,EACFC,EAAAA,IAACN,EAAY,CAACI,IAAKF"}
|
|
1
|
+
{"version":3,"file":"Floating-f251f4e6.js","sources":["../../src/UNSAFE_Floating/FloatingTail.tsx","../../src/UNSAFE_Floating/Floating.tsx"],"sourcesContent":["import { forwardRef } from 'preact/compat';\nimport { RefObject } from 'preact';\nimport { PositionData, Coords } from '../hooks/UNSAFE_useFloating';\n\nconst FloatingTail = forwardRef<HTMLDivElement>(({}, arrowRef) => {\n return (\n <div ref={arrowRef}> {/*Outer arrow - shadow*/}\n <div></div> {/*Inner arrow - body*/}\n </div>\n );\n});\n\nfunction renderTail(\n data: PositionData,\n anchorRef: RefObject<Element | Coords>,\n arrowRef: RefObject<Element>,\n tail: 'none' | 'simple',\n isRtl: boolean\n) {\n if (tail === 'simple' && data.arrow) {\n const { x, y, centerOffset } = data.arrow;\n const arrowEl = arrowRef.current as Element;\n const arrowSize = 7;\n const arrowSizeCorner = 6;\n const arrowInnerEl = arrowRef.current?.querySelector('div') as Element;\n const arrowInnerSize = 5;\n const arrowInnerSizeCorner = 5;\n const arrowCommonStyle = {\n position: 'absolute',\n width: '0px',\n height: '0px'\n };\n let anchorRefHeight = 0;\n let anchorRefWidth = 0;\n const current = anchorRef.current;\n\n // @ts-ignore. Type 'Element | Coords' issues\n // Property 'x' does not exist on type 'Element'.\n // Property 'y' does not exist on type 'Element'.\n const isAnchorRefElement = current?.x === undefined && current?.y === undefined;\n if (isAnchorRefElement) {\n // @ts-ignore. Property 'getBoundingClientRect' does not exist on type 'Coords'.\n anchorRefHeight = Math.round(current.getBoundingClientRect().height);\n // @ts-ignore. Property 'getBoundingClientRect' does not exist on type 'Coords'.\n anchorRefWidth = Math.round(anchorRef.current?.getBoundingClientRect().width);\n }\n const isCornerVerticalPlacement = isAnchorRefElement ?\n Math.abs(centerOffset) >= anchorRefHeight / 2 - arrowSize / 2 :\n ['start-top-corner', 'start-bottom-corner', 'end-top-corner', 'end-bottom-corner'].includes(data.origPlacement);\n const isCornerHorizontalPlacement = isAnchorRefElement ?\n Math.abs(centerOffset) >= anchorRefWidth / 2 - arrowSize / 2 :\n ['top-start-corner', 'top-end-corner', 'bottom-start-corner', 'bottom-end-corner'].includes(data.origPlacement);\n const isCenter = centerOffset === 0;\n const isCenterOffsetPositive = centerOffset > 0;\n\n // Set styles of the arrow\n setElementStyle(arrowCommonStyle, arrowEl);\n setElementStyle(arrowCommonStyle, arrowInnerEl);\n\n // Set sizes of the arrow\n setArrowSizes(isCornerVerticalPlacement || isCornerHorizontalPlacement);\n\n // Corner vs. normal arrow\n function setArrowSizes(isCornerPlacement?: boolean) {\n // Outer arrow (shadow)\n const arrowFinalSize = isCornerPlacement ? arrowSizeCorner : arrowSize;\n setArrowStyle({\n borderTop: `${getSize(arrowFinalSize)} solid rgba(var(--oj-c-PRIVATE-DO-NOT-USE-palette-neutral-rgb-90), 0.1)`,\n borderRight: getTransparentBorder(arrowFinalSize),\n borderLeft: getTransparentBorder(arrowFinalSize)\n });\n // Inner arrow\n const arrowInnerFinalSize = isCornerPlacement ? arrowInnerSizeCorner : arrowInnerSize;\n setArrowInnerStyle({\n borderTop: `${getSize(arrowInnerFinalSize)} solid var(--oj-c-PRIVATE-DO-NOT-USE-popup-bg-color)`,\n borderRight: `${getTransparentBorder(arrowInnerFinalSize)}`,\n borderLeft: `${getTransparentBorder(arrowInnerFinalSize)}`,\n })\n }\n\n function setElementStyle(style: object, element: Element) {\n //@ts-ignore - regarding types arrowEl.style is not under our control\n Object.assign(element?.style, style);\n }\n\n function setArrowStyle(style: object) {\n setElementStyle(style, arrowEl);\n }\n\n function setArrowInnerStyle(style: object) {\n setElementStyle(style, arrowInnerEl);\n }\n\n function getTurn(eighth: number) {\n return `rotate(${(eighth) * 45}deg)`;\n }\n\n function getSize(size: number) {\n return `${size}px`;\n }\n\n function getTransparentBorder(size: number) {\n return `${getSize(size)} solid transparent`;\n }\n\n const placementArr = data.placement.split('-');\n const side = placementArr[0];\n\n switch(side) {\n case 'top': setArrowTop(); break;\n case 'end': isRtl ? setArrowStart() : setArrowEnd();break;\n case 'bottom': setArrowBottom(); break;\n case 'start': isRtl ? setArrowEnd() : setArrowStart(); break;\n }\n\n function setArrowTop() {\n if (x != undefined) {\n if (isCornerHorizontalPlacement) {\n // Top corners\n setArrowStyle({\n top: '', // flip 'reset'\n bottom: getSize(-arrowSize + 2),\n left: getSize(x + (isCenterOffsetPositive ? 5 : -5)),\n transform: getTurn(isCenterOffsetPositive ? 5 : 3)\n });\n setCornerArrowInner();\n } else {\n setArrowStyle({\n top: '', // flip 'reset'\n bottom: getSize(-arrowSize),\n left: isCenter ? getSize(x) : getSize(x + (isCenterOffsetPositive ? 1 : -1)),\n transform: getTurn(0)\n });\n setNonCornerArrowInner();\n }\n }\n }\n\n function setArrowEnd() {\n if (y != undefined) {\n if (isCornerVerticalPlacement) {\n // End corners\n setArrowStyle({\n top: getSize(y + (isCenterOffsetPositive ? 2 : -2)),\n right: '', // flip 'reset'\n left: getSize(-arrowSize -1),\n transform: getTurn(isCenterOffsetPositive ? 7 : 5)\n });\n setCornerArrowInner();\n } else {\n // End\n setArrowStyle({\n top: isCenter ? getSize(y) : getSize(y + (isCenterOffsetPositive ? -2 : +2)),\n right: '', // flip 'reset'\n left: getSize(-arrowSize * 1.5),\n transform: getTurn(2)\n });\n setNonCornerArrowInner();\n }\n }\n }\n\n function setArrowBottom() {\n if (x != undefined) {\n if (isCornerHorizontalPlacement) {\n // Bottom corners\n setArrowStyle({\n top: getSize(-arrowSize + 3),\n bottom: '', // flip 'reset'\n left: getSize(x + (isCenterOffsetPositive ? 4 : -4)),\n transform: getTurn(isCenterOffsetPositive ? 2 : 6)\n });\n setArrowInnerStyle({\n top: getSize(-arrowInnerSize),\n left: getSize(-arrowInnerSize + (isCenterOffsetPositive ? 1 : -1))\n });\n } else {\n setArrowStyle({\n top: getSize(-arrowSize),\n bottom: '', // flip 'reset'\n left: isCenter ? getSize(x) : getSize(x + (isCenterOffsetPositive ? 1 : -1)),\n transform: getTurn(4)\n });\n setNonCornerArrowInner();\n }\n }\n }\n\n function setArrowStart() {\n if (y != undefined) {\n if (isCornerVerticalPlacement) {\n // Start corners\n setArrowStyle({\n top: getSize(y + (isCenterOffsetPositive ? 2 : -2)),\n right: getSize(-arrowSize - 1),\n left: '', // flip 'reset'\n transform: getTurn(isCenterOffsetPositive ? 1 : 3)\n });\n setArrowInnerStyle({\n top: getSize(-arrowInnerSize),\n left: getSize(-arrowInnerSize + (isCenterOffsetPositive ? -2 : 2))\n });\n } else {\n // Start\n setArrowStyle({\n top: isCenter ? getSize(y) : getSize(y + (isCenterOffsetPositive ? -2 : +2)),\n right: getSize(-arrowSize * 1.5),\n left: '', // flip 'reset'\n transform: getTurn(6)\n });\n setNonCornerArrowInner();\n }\n }\n }\n\n function setCornerArrowInner() {\n setArrowInnerStyle({\n top: getSize(-arrowInnerSize),\n left: getSize(-arrowInnerSize + (isCenterOffsetPositive ? 2 : -2))\n });\n }\n\n function setNonCornerArrowInner() {\n setArrowInnerStyle({\n top: getSize(-arrowInnerSize - 2),\n left: getSize(-arrowInnerSize)\n });\n }\n }\n}\n\nexport { FloatingTail, renderTail };\n","import { RefObject } from 'preact';\nimport { useLayoutEffect, useMemo, useState, useRef, useCallback } from 'preact/hooks';\nimport { forwardRef, ForwardedRef } from 'preact/compat';\nimport { autoUpdate, arrow } from '@floating-ui/dom';\nimport {\n useFloating,\n shift,\n flip,\n size,\n offset,\n limitShift,\n PositionData\n} from '../hooks/UNSAFE_useFloating';\nimport { mergeRefs } from '../utils/PRIVATE_refUtils';\nimport { Offset, Placement, Coords, VirtualElement, Rect } from '../hooks/UNSAFE_useFloating';\nimport { useOutsideClick } from '../hooks/UNSAFE_useOutsideClick';\nimport { HTMLAttributesSignalExcluded } from '../utils/UNSAFE_attributeUtils';\nimport { useUser } from '../hooks/UNSAFE_useUser';\nimport { FloatingTail, renderTail } from './FloatingTail';\n\ntype IntrinsicProps = Pick<HTMLAttributesSignalExcluded<HTMLDivElement>, 'children' | 'class'>;\n\ntype FlipOptions = {\n mainAxis?: boolean; // This is the main axis in which overflow is checked to perform a flip. Default true.\n crossAxis?: boolean; // This is the cross axis in which overflow is checked to perform a flip, the opposite axis of mainAxis. Default false.\n};\n\ntype ShiftOptions = {\n mainAxis?: boolean; // This is the main axis in which shifting is applied. Default true.\n crossAxis?: boolean; // This is the cross axis in which shifting is applied, the opposite axis of mainAxis. Default false\n};\n\n/**\n * This describes the virtual padding around the collision boundary (currently the view port).\n * This could be extended in the future,\n * i.e. property to define what is a boundary ( a view port, a document, some other html element)\n */\nexport type BoundaryOptions = {\n padding?: number | {\n top: number;\n right: number;\n bottom: number;\n left: number;\n };\n}\n/**\n * Specifies the resizing behaviour for max-height and max-width of the floating component.\n * The floating element will change the size depending on the available space.\n * isMaxHeightAdjusted/isMaxWidthAdjusted - sets the max-height/max-width of the floating to the available space till the collision.\n * maxHeightCeiling/maxWidthCeiling - this is the limit for max-height/max-width that should not be exceeded, even if there is more available space till the collision.\n */\nexport type SizeOptions = {\n isMaxWidthAdjusted?: boolean;\n isMaxHeightAdjusted?: boolean;\n maxHeightCeiling?: number;\n maxWidthCeiling?: number;\n}\n\ntype Props = IntrinsicProps & {\n /**\n * Placement of the floating element relative to the trigger.\n * Possible values are:\n * <p> <code>'top' </code> <code>'top-start' </code> <code> 'top-end' </code> <code> 'top-start-corner' </code> <code> 'top-end-corner' </code>\n * <code> 'end' </code> <code> 'end-top' </code> <code> 'end-bottom' </code> <code> 'end-top-corner' </code> <code> 'end-bottom-corner' </code>\n * <code> 'bottom' </code> <code> 'bottom-start' </code> <code> 'bottom-end' </code> <code> 'bottom-start-corner' </code> <code> 'bottom-end-corner' </code>\n * <code> 'start' </code> <code> 'start-top' </code> <code> 'start-bottom' </code> <code> 'start-top-corner' </code> <code> 'start-bottom-corner' </code>\n * </p>\n */\n placement?: Placement;\n\n /**\n * Trigger element reference.\n */\n anchorRef: RefObject<Element | Coords>;\n\n /**\n * Placement offset.\n * Offset displaces the floating element from its core placement along the specified axes.\n * Offset could be a number, object or a function.\n * A number represents the distance (gutter or margin) between the floating element and the reference element.\n * This is shorthand for mainAxis.\n * <pre>\n * {\n * mainAxis?: number;\n * crossAxis?: number;\n * }\n * </pre>\n * <p><code>mainAxis</code> represents the distance (gutter or margin) between the floating element and the reference element.</p>\n * <p><code>crossAxis</code> represents the shifting between the floating element and the reference element.<p>\n * You may also pass a function which returns the previously listed values — this enables you to read the dimensions of the reference or floating elements and the current placement.\n * <pre>\n * (args: {\n * floating: Rect;\n * reference: Rect;\n * placement: Placement;\n * }) => OffsetValue\n * </pre>\n */\n offsetValue?: Offset;\n\n /**\n * Click outside callback.\n */\n onClickOutside?: (event: MouseEvent) => void;\n\n /**\n * Specifies the flipping behavior along the respective axis.\n * When true, the floating element will be flipped to prevent overflow.\n * Default values are 'true' for mainAxis and 'false' for crossAxis.\n */\n flipOptions?: FlipOptions;\n\n /**\n * Specifies the shift behavior along the respective axis.\n * When true, the floating element will shift to prevent overflow.\n * Default values are 'true' for mainAxis and 'false' for crossAxis.\n */\n shiftOptions?: ShiftOptions;\n\n /**\n * Triggered when placement or coordinates are changed after collision is detected\n */\n onPosition?: (data: PositionData) => void;\n\n /**\n * Tail\n */\n tail?: 'none' | 'simple';\n\n /**\n * Specifies the resizing behaviour for height and width of the floating component.\n * When either of the options isMaxHeightAdjusted, isMaxWidthAdjusted is true, the floating element will change the size depending on the available space.\n * Default values are 'false'.\n * maxHeightCeiling and maxWidthCeiling are maximal values that could not be exceeded.\n * Default are undefined and it means to use full available width/height.\n */\n sizeOptions?: SizeOptions;\n\n /**\n * This describes the virtual padding around the collision boundary to check for overflow.\n * Default value for padding is 0.\n */\n boundaryOptions?: BoundaryOptions;\n};\n\nfunction isElement(value: any): value is Element {\n return value instanceof Element;\n}\n/**\n * A floating component allows the user to create a floating element that is displayed on the the \"top layer\" of all other elements.\n * The Floating component is an advanced component and is used underneath Popup, Tooltip, SelectMultiple, Menu and other components.\n */\nexport const Floating = forwardRef(\n (\n {\n children,\n onClickOutside,\n placement = 'bottom',\n anchorRef,\n offsetValue,\n class: className,\n tail = 'none',\n flipOptions = { mainAxis: true, crossAxis: false },\n shiftOptions = { mainAxis: true, crossAxis: false },\n sizeOptions = { isMaxHeightAdjusted: false, isMaxWidthAdjusted: false },\n boundaryOptions = { padding: 0 },\n onPosition\n }:\n Props,\n ref: ForwardedRef<HTMLElement | null>\n ) => {\n const arrowRef = useRef<HTMLDivElement>(null);\n\n const [previousAnchor, setPreviousAnchor] = useState<Element | Coords | null>(null);\n\n // we need to be sure anchorRef.current exists in first call\n // to be able to set the previousAnchor state\n useLayoutEffect(() => {\n setPreviousAnchor(anchorRef.current);\n }, []);\n\n // In case anchorRef.current changes and we need to update floating position\n // when it changes, we need to have copy in the state.\n // For example when anchorRef is Coords( virtual element)\n if (anchorRef.current !== previousAnchor) {\n setPreviousAnchor(anchorRef.current);\n }\n\n const { direction } = useUser();\n const isRtl = direction === 'rtl';\n\n\n const _onPosition = useCallback(\n (data: PositionData) => {\n renderTail(data, anchorRef, arrowRef, tail, isRtl);\n onPosition?.(data);\n },\n [placement, anchorRef, arrowRef, tail, onPosition]\n );\n\n const middleware = [\n offset(offsetValue),\n flip({\n mainAxis: flipOptions.mainAxis,\n crossAxis: flipOptions.crossAxis,\n padding: boundaryOptions.padding\n }),\n shift({\n mainAxis: shiftOptions.mainAxis,\n crossAxis: shiftOptions.crossAxis,\n limiter: limitShift({\n mainAxis: shiftOptions.mainAxis,\n crossAxis: shiftOptions.crossAxis\n })\n }),\n ...(arrowRef.current\n ? [\n arrow({\n element: arrowRef.current\n })\n ]\n : [])\n ];\n if (sizeOptions.isMaxHeightAdjusted || sizeOptions.isMaxWidthAdjusted ) {\n middleware.push(\n size({\n apply({ availableWidth, availableHeight, elements }) {\n if (sizeOptions.isMaxHeightAdjusted) {\n Object.assign(elements.floating.style, {\n maxHeight: `${Math.min(availableHeight, sizeOptions.maxHeightCeiling || availableHeight)}px`\n });\n }\n if (sizeOptions.isMaxWidthAdjusted) {\n Object.assign(elements.floating.style, {\n maxWidth: `${Math.min(availableWidth, sizeOptions.maxWidthCeiling || availableWidth)}px`,\n });\n }\n },\n\n padding: boundaryOptions.padding\n }));\n }\n\n const { x, y, reference, floating, refs } = useFloating({\n placement: placement,\n middleware: middleware,\n whileElementsMounted: autoUpdate,\n onPosition: _onPosition\n });\n\n useOutsideClick({ isDisabled: false, ref: refs.floating, handler: onClickOutside });\n\n useLayoutEffect(() => {\n if (isElement(previousAnchor)) {\n const element = previousAnchor as Element;\n reference(element);\n return;\n }\n const coords = previousAnchor as Coords;\n const virtualEl: VirtualElement = {\n getBoundingClientRect() {\n return {\n width: 0,\n height: 0,\n x: coords!.x,\n y: coords!.y,\n top: coords!.y,\n left: coords!.x,\n right: coords!.x,\n bottom: coords!.y\n };\n }\n };\n if (coords && coords.x != null) {\n reference(virtualEl);\n }\n }, [previousAnchor, reference]);\n\n const stableRef = useMemo(() => mergeRefs(ref, floating), [ref, floating]);\n const content = (\n <div\n class={className}\n ref={stableRef}\n style={{\n display: 'block',\n visibility: x == null && y == null ? 'hidden' : 'visible',\n position: 'absolute',\n top: y ?? '',\n left: x ?? '',\n width: 'auto',\n height: 'auto'\n }}>\n {children}\n <FloatingTail ref={arrowRef} />\n </div>\n );\n return content;\n }\n);\n\nexport { Offset, Placement, Coords, Rect, FlipOptions, ShiftOptions, PositionData };\n"],"names":["FloatingTail","forwardRef","arrowRef","_jsxs","ref","children","_jsx","Floating","onClickOutside","placement","anchorRef","offsetValue","class","className","tail","flipOptions","mainAxis","crossAxis","shiftOptions","sizeOptions","isMaxHeightAdjusted","isMaxWidthAdjusted","boundaryOptions","padding","onPosition","useRef","previousAnchor","setPreviousAnchor","useState","useLayoutEffect","current","direction","useUser","isRtl","_onPosition","useCallback","data","arrow","x","y","centerOffset","arrowEl","arrowSize","arrowSizeCorner","arrowInnerEl","_a","querySelector","arrowInnerSize","arrowInnerSizeCorner","arrowCommonStyle","position","width","height","anchorRefHeight","anchorRefWidth","isAnchorRefElement","undefined","Math","round","getBoundingClientRect","_b","isCornerVerticalPlacement","abs","includes","origPlacement","isCornerHorizontalPlacement","isCenter","isCenterOffsetPositive","setArrowSizes","isCornerPlacement","arrowFinalSize","setArrowStyle","borderTop","getSize","borderRight","getTransparentBorder","borderLeft","arrowInnerFinalSize","setArrowInnerStyle","setElementStyle","style","element","Object","assign","getTurn","eighth","size","split","setArrowTop","setArrowStart","setArrowEnd","setArrowBottom","top","bottom","left","transform","setCornerArrowInner","setNonCornerArrowInner","right","renderTail","middleware","offset","flip","shift","limiter","limitShift","push","apply","availableWidth","availableHeight","elements","floating","maxHeight","min","maxHeightCeiling","maxWidth","maxWidthCeiling","reference","refs","useFloating","whileElementsMounted","autoUpdate","N","useOutsideClick","isDisabled","handler","Element","coords","virtualEl","stableRef","useMemo","mergeRefs","display","visibility"],"mappings":"sNAIA,MAAMA,EAAeC,EAAUA,WAAiB,IAAKC,IAEjDC,EAAAA,0BAAKC,IAAKF,GACR,CAAAG,SAAA,CAAA,IAAAC,EAAAA,IAAA,MAAA,IACI,SCgJG,MAAAC,EAAWN,EAAUA,WAChC,EAEII,SAAAA,EACAG,eAAAA,EACAC,UAAAA,EAAY,SACZC,UAAAA,EACAC,YAAAA,EACAC,MAAOC,EACPC,KAAAA,EAAO,OACPC,YAAAA,EAAc,CAAEC,UAAU,EAAMC,WAAW,GAC3CC,aAAAA,EAAe,CAAEF,UAAU,EAAMC,WAAW,GAC5CE,YAAAA,EAAc,CAAEC,qBAAqB,EAAOC,oBAAoB,GAChEC,gBAAAA,EAAkB,CAAEC,QAAS,GAC7BC,WAAAA,GAGFpB,KAEA,MAAMF,EAAWuB,SAAuB,OAEjCC,EAAgBC,GAAqBC,EAAQA,SAA0B,MAI9EC,EAAAA,gBAAgB,KACdF,EAAkBjB,EAAUoB,UAC3B,IAKCpB,EAAUoB,UAAYJ,GACxBC,EAAkBjB,EAAUoB,SAG9B,MAAMC,UAAEA,GAAcC,EAAAA,UAChBC,EAAsB,QAAdF,EAGRG,EAAcC,cACjBC,KDrLP,SACEA,EACA1B,EACAR,EACAY,EACAmB,WAEA,GAAa,WAATnB,GAAqBsB,EAAKC,MAAO,CACnC,MAAMC,EAAEA,EAACC,EAAEA,EAACC,aAAEA,GAAiBJ,EAA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AAA,KAAA,MAAA+E,OAAAC,OAAA,CACEvE,MAAOC,EACPT,IAAK6H,EACLjD,MAAO,CACLoD,QAAS,QACTC,WAAiB,MAAL/F,GAAkB,MAALC,EAAY,SAAW,UAChDW,SAAU,WACV0C,IAAKrD,MAAAA,EAAAA,EAAK,GACVuD,KAAMxD,MAAAA,EAAAA,EAAK,GACXa,MAAO,OACPC,OAAQ,SAER,CAAA/C,SAAA,CAAAA,EACFC,EAAAA,IAACN,EAAY,CAACI,IAAKF"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
define(["exports","preact/jsx-runtime","preact","preact/compat","./utils/UNSAFE_classNames",'module',"./utils/PRIVATE_tabbableUtils","./classNames-f9dd69a8"],function(e,t,r,n,s,c,u,o){"use strict";const a="crkrys",l=n.forwardRef(({onFocus:e},r)=>t.jsx("div",{class:a,onFocus:e,ref:r,tabIndex:0})),i=e=>{e&&u.isTabbableElement(e)&&setTimeout(()=>{u.focusOn(e)},0)},f=(e,t)=>{if(0===e.length)return!1;const r=null!=t?t:u.getActiveElement(e[0]);return e.some(e=>e===r||(null==e?void 0:e.contains(r)))},d="_1ui721v";e.FocusTrap=({autoFocusRef:e,children:s,isDisabled:c=!1,restoreFocusRef:a})=>{const p=n.useRef(null),m=n.useRef(null),b=n.useRef(null),F=n.useRef(null),v=o.classNames([d]),g=n.useCallback(e=>{const t=p.current;!c&&t&&e&&(e&&f([t,m.current,b.current],e)?F.current=e:F.current?u.focusOn(F.current):u.focusWithin(t))},[c]);return n.useEffect(()=>{const t=p.current;if(!t||c)return;const r=u.getActiveElement(t);e&&e.current?u.focusOn(e.current):g(r);const n=a;return()=>{!1!==n&&i((null==n?void 0:n.current)||r)}},[e,g,c,a]),t.jsxs(r.Fragment,{children:[!c&&t.jsx(l,{onFocus:e=>{!c&&p.current&&(u.focusOnEnd(p.current),e.stopPropagation(),e.preventDefault())},ref:m}),t.jsx("div",Object.assign({onFocus:e=>{F.current=e.target},ref:p,class:v},{children:s})),!c&&t.jsx(l,{onFocus:e=>{!c&&p.current&&(u.focusOnStart(p.current),e.stopPropagation(),e.preventDefault())},ref:b})]})}});
|
|
2
|
+
//# sourceMappingURL=FocusTrap-3123561d.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FocusTrap-
|
|
1
|
+
{"version":3,"file":"FocusTrap-3123561d.js","sources":["../../src/UNSAFE_FocusTrap/FocusGuard.tsx","../../src/UNSAFE_FocusTrap/FocusTrap.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { forwardRef, ForwardedRef } from 'preact/compat';\nimport { cssProps } from '@oracle/oraclejet-cssprops';\n\ntype Props = {\n onFocus: (event: FocusEvent) => void;\n};\n\nconst styles = {\n guard: cssProps`${{\n height: '0px',\n left: 0,\n position: 'fixed',\n top: 0,\n width: '1px'\n }}`\n};\n\n/**\n * Styled FocusTrap sub-component to render non-visible focus guards\n */\nconst FocusGuard = forwardRef(({ onFocus }: Props, guardRef: ForwardedRef<HTMLDivElement>) => {\n return <div class={styles.guard} onFocus={onFocus} ref={guardRef} tabIndex={0} />;\n});\n\nexport default FocusGuard;\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\nimport { ComponentChildren, Fragment, RefObject } from 'preact';\nimport { useCallback, useEffect, useRef } from 'preact/compat';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { cssProps } from '@oracle/oraclejet-cssprops';\nimport {\n focusOn,\n focusOnEnd,\n focusOnStart,\n focusWithin,\n getActiveElement,\n isTabbableElement\n} from '../utils/PRIVATE_tabbableUtils';\nimport FocusGuard from './FocusGuard';\n\ntype Props = {\n children: ComponentChildren;\n /**\n * Optional Ref to an element to focus on when component mounts\n * @default - undefined - behavior is to focus on first tabbableElement\n */\n autoFocusRef?: RefObject<HTMLElement | null>;\n\n /**\n * Sets whether focus is managed and whether guards are present\n * @default false\n */\n isDisabled?: boolean;\n\n /**\n * Why a isDisabled prop as compared to ONLY supporting conditional rendering?\n *\n * 1) We need an actual HTML Element for the trap, conditional rendering an element potentially breaks consumer CSS\n * 2) Conditional rendering can short-circuit event bubbling in preact and lead to expected events not bubbling.\n */\n\n /**\n * Optional Ref to element to focus on when component un-mounts, false to disable.\n * @default - undefined - behavior is to focus on the original activeElement when focus trap was enabled\n */\n restoreFocusRef?: RefObject<HTMLElement> | false;\n};\n\n/**\n * Trap focus within a DOM node. When a user hits Tab or Shift+Tab, focus remains in the focus trap.\n */\nexport const FocusTrap = ({\n autoFocusRef,\n children,\n isDisabled = false,\n restoreFocusRef\n}: Props) => {\n const trapRef = useRef<HTMLDivElement>(null);\n const startGuardRef = useRef<HTMLDivElement>(null);\n const endGuardRef = useRef<HTMLDivElement>(null);\n const lastActiveElementRef = useRef<HTMLElement | null>(null);\n\n // classes to be set on the children wrapper\n const classes = classNames([childrenStyles]);\n\n /**\n * contain focus if trap is enabled, and target is not already contained\n *\n * calling cases for side-effect of setting focus\n * - on initial mount of (enabled) trap, where target is not inside trap\n * - on enabling of a disabled trap, where target is not inside trap\n * - target of click event is outside of trap.\n */\n const conditionallyContainFocus = useCallback(\n (target: HTMLElement | null) => {\n const trap = trapRef.current;\n // short-circuit, if trap or target not valid\n if (isDisabled || !trap || !target) return;\n\n // just update ref if, target already has focus\n if (target && hasFocus([trap, startGuardRef.current, endGuardRef.current], target)) {\n lastActiveElementRef.current = target;\n return;\n }\n\n // set focus to last active tab-stop if lastElement is defined and inside trap\n if (lastActiveElementRef.current) {\n focusOn(lastActiveElementRef.current);\n } else {\n // otherwise just contain focus within trap as target is outside enabled trap and we have no last-known tab-stop\n focusWithin(trap);\n }\n },\n [isDisabled]\n );\n\n // loop focus\n const handleStartGuardOnFocus = (event: FocusEvent) => {\n if (isDisabled || !trapRef.current) return;\n focusOnEnd(trapRef.current);\n\n // prevent scroll jump and bubbling this event up as a focus event\n event.stopPropagation();\n event.preventDefault();\n };\n\n const handleEndGuardOnFocus = (event: FocusEvent) => {\n if (isDisabled || !trapRef.current) return;\n focusOnStart(trapRef.current);\n\n // prevent scroll jump and bubbling guard event up as a focus event\n event.stopPropagation();\n event.preventDefault();\n };\n\n const handleTrapOnFocus = (event: FocusEvent) => {\n lastActiveElementRef.current = event.target as HTMLElement;\n };\n\n // handle initial render or re-render as enabled\n useEffect(() => {\n const trap = trapRef.current;\n if (!trap || isDisabled) return;\n\n const originalActiveElement = getActiveElement(trap);\n\n // init focus\n if (autoFocusRef && autoFocusRef.current) {\n focusOn(autoFocusRef.current);\n } else {\n conditionallyContainFocus(originalActiveElement);\n }\n\n const restoreFocusRefForCleanup = restoreFocusRef;\n\n return () => {\n if (restoreFocusRefForCleanup === false) return;\n restoreFocusAfterUnmount(restoreFocusRefForCleanup?.current || originalActiveElement);\n };\n }, [autoFocusRef, conditionallyContainFocus, isDisabled, restoreFocusRef]);\n\n return (\n <Fragment>\n {!isDisabled && <FocusGuard onFocus={handleStartGuardOnFocus} ref={startGuardRef} />}\n <div onFocus={handleTrapOnFocus} ref={trapRef} class={classes}>\n {children}\n </div>\n {!isDisabled && <FocusGuard onFocus={handleEndGuardOnFocus} ref={endGuardRef} />}\n </Fragment>\n );\n};\n\n// setTimeout ensures that unmount lifecycle has completed\nconst restoreFocusAfterUnmount = (element: HTMLElement | null) => {\n if (element && isTabbableElement(element)) {\n setTimeout(() => {\n focusOn(element);\n }, 0);\n }\n};\n\n// is focus already contained?\nconst hasFocus = (elements: (HTMLElement | null)[], target: Element) => {\n if (elements.length === 0) return false;\n const activeElement = target ?? getActiveElement(elements[0] as Node);\n return elements.some((el) => el === activeElement || el?.contains(activeElement));\n};\n\n// remove margins from children\nconst childrenStyles = cssProps`${{\n /* @ts-ignore */\n '& > *': {\n marginTop: '0 !important',\n marginBottom: '0 !important',\n marginLeft: '0 !important',\n marginRight: '0 !important'\n }\n}}`;\n"],"names":["styles","FocusGuard","forwardRef","onFocus","guardRef","_jsx","class","ref","tabIndex","restoreFocusAfterUnmount","element","isTabbableElement","hasFocus","elements","target","length","activeElement","getActiveElement","childrenStyles","autoFocusRef","children","isDisabled","restoreFocusRef","trapRef","useRef","startGuardRef","endGuardRef","lastActiveElementRef","conditionallyContainFocus","useCallback","trap","current","focusOn","originalActiveElement","restoreFocusRefForCleanup","event","focusOnEnd","focusOnStart"],"mappings":"sMAeA,MAAAA,WAaAC,EAAAC,EAAAA,WAAA,EAAAC,QAAAA,GAAAC,IACEC,EAAAA,IAAA,MAAA,CAAAC,MAAAN,EAAAG,QAAAA,EAAAI,IAAAH,EAAAI,SAAA,KC6HFC,EAAAC,IACEA,GAAAC,oBAAAD,sCAQFE,EAAA,CAAAC,EAAAC,KACE,GAAA,IAAAD,EAAAE,OAA2B,OAAA,EAC3B,MAAAC,EAAAF,MAAAA,EAAAA,EAAAG,EAAAA,iBAAAJ,EAAA,6DAKFK,EAAA,uBAtHA,EAAAC,aAAAA,EAAAC,SAAAA,EAAAC,WAAAA,GAAA,EAAAC,gBAAAA,MAME,MAAAC,EAAAC,SAAA,MACAC,EAAAD,SAAA,MACAE,EAAAF,SAAA,MACAG,EAAAH,SAAA,0BAaAI,EAAAC,EAAAA,YAAAf,IAEI,MAAAgB,EAAAP,EAAAQ,SAEAV,GAAAS,GAAAhB,IAGAA,GAAAF,EAAA,CAAAkB,EAAAL,EAAAM,QAAAL,EAAAK,SAAAjB,GACEa,EAAAI,QAAAjB,YAMAkB,UAAAL,EAAAI,4BAKJ,CAAAV,4BA6BA,MAAAS,EAAAP,EAAAQ,wBAGA,MAAAE,EAAAhB,mBAAAa,GAGAX,GAAAA,EAAAY,QACEC,UAAAb,EAAAY,wBAOF,MAAA,aAEEtB,GAAAyB,MAAAA,OAAA,EAAAA,EAAAH,UAAAE,kEAxCJE,KACEd,GAAAE,EAAAQ,UACAK,aAAAb,EAAAQ,6FAgBFI,IACER,EAAAI,QAAAI,EAAArB,2DAVFqB,KACEd,GAAAE,EAAAQ,UACAM,eAAAd,EAAAQ"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
define(["exports","./utils/UNSAFE_classNames",'module',"./hooks/UNSAFE_useTranslationBundle","./classNames-f9dd69a8"],function(s,a,e,l,o){"use strict";const n="_1vtql92",t="_3wdd21";s.getFormControlClasses=s=>o.classNames([n,s&&t]),s.getLoadingAriaLabel=()=>l.useTranslationBundle("@oracle/oraclejet-preact").formControl_loading()});
|
|
2
|
+
//# sourceMappingURL=FormControlUtils-3c0aac96.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormControlUtils-
|
|
1
|
+
{"version":3,"file":"FormControlUtils-3c0aac96.js","sources":["../../src/UNSAFE_TextField/FormControlUtils.ts"],"sourcesContent":["import { classNames } from '../utils/UNSAFE_classNames';\nimport { cssProps } from '@oracle/oraclejet-cssprops';\nimport { useTranslationBundle } from '../hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '../resources/nls/bundle';\n\nconst rootStyles = {\n base: cssProps`${{\n verticalAlign: 'top'\n }}`,\n\n labelInside: cssProps`${{\n maxWidth: '100%'\n }}`\n};\n\nexport const getFormControlClasses = (hasInsideLabel?: boolean) => {\n return classNames([rootStyles.base, hasInsideLabel && rootStyles.labelInside]);\n};\n\nexport const getLoadingAriaLabel = () => {\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n return translations.formControl_loading();\n};\n"],"names":["rootStyles","hasInsideLabel","classNames","useTranslationBundle","formControl_loading"],"mappings":"wJAKA,MAAAA,EAAA,WAAAA,oCAUAC,GACEC,EAAAA,WAAA,CAAAF,EAAAC,GAAAD,0BAGF,IACEG,uBAAA,4BACAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
define(["exports","./tslib.es6-d809b4dd","preact/jsx-runtime","./keys-7dc8fa94","./utils/UNSAFE_arrayUtils",'module',"./utils/UNSAFE_mergeInterpolations"],function(s,e,i,l,n,a,t){"use strict";const r=n.stringLiteralArray(["h1","h2","h3","h4","h5","h6"]),h={h1:"2xl",h2:"xl",h3:"lg",h4:"md",h5:"sm",h6:"xs"},c={base:"wh4l9g",size:{xs:"_1lih1wm",sm:"jg874k",md:"_1iaz7kj",lg:"h3j391",xl:"_1e3h8pu","2xl":"f9twl",inherit:"_3a6cjh"},childrenMargins:"_9eevjo"},d=l.keys_1(c.size),g=[()=>({class:c.base}),({size:s="2xl"})=>({class:c.size[s]})],o=t.mergeInterpolations(g);s.Heading=function(s){var l,{children:n}=s,a=e.__rest(s,["children"]);const t=a.as;a.size=null!==(l=a.size)&&void 0!==l?l:h[t];const r=o(a),{class:d}=r,g=e.__rest(r,["class"]);return i.jsx(t,Object.assign({className:d,style:g,id:a.id},{children:i.jsx("span",Object.assign({className:c.childrenMargins},{children:n}))}))},s.headingElementTypes=r,s.sizeOptions=d});
|
|
2
|
+
//# sourceMappingURL=Heading-c1db732f.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Heading-
|
|
1
|
+
{"version":3,"file":"Heading-c1db732f.js","sources":["../../src/UNSAFE_Heading/Heading.tsx"],"sourcesContent":["import { ComponentChildren } from 'preact';\nimport keys from 'ramda/src/keys';\nimport { stringLiteralArray } from '../utils/UNSAFE_arrayUtils';\nimport { cssProps } from '@oracle/oraclejet-cssprops';\nimport { mergeInterpolations } from '../utils/UNSAFE_mergeInterpolations';\n\nexport const headingElementTypes = stringLiteralArray(['h1', 'h2', 'h3', 'h4', 'h5', 'h6']);\n\ntype ElementType = typeof headingElementTypes[number];\n\ntype HeadingProps = {\n /**\n * Specifies the heading tag\n */\n as: ElementType;\n\n /**\n * Specifies the font size and line height. */\n\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'inherit';\n\n /**\n * Specifies the header id\n */\n id?: string;\n\n /**\n * Specifies the children\n */\n children: ComponentChildren;\n};\n\nconst headingsizeMap: { [headingType in ElementType]: string } = {\n h1: '2xl',\n h2: 'xl',\n h3: 'lg',\n h4: 'md',\n h5: 'sm',\n h6: 'xs'\n};\n\nconst styles = {\n base: cssProps`${{\n margin: 0\n }}`,\n size: {\n xs: cssProps`${{\n fontSize: 'var(--oj-c-PRIVATE-DO-NOT-USE-typography-heading-xs-font-size)',\n fontWeight: 'var(--oj-c-PRIVATE-DO-NOT-USE-typography-heading-xs-font-weight)',\n lineHeight: 'var(--oj-c-PRIVATE-DO-NOT-USE-typography-heading-xs-line-height)'\n }}`,\n sm: cssProps`${{\n fontSize: 'var(--oj-c-PRIVATE-DO-NOT-USE-typography-heading-sm-font-size)',\n fontWeight: 'var(--oj-c-PRIVATE-DO-NOT-USE-typography-heading-sm-font-weight)',\n lineHeight: 'var(--oj-c-PRIVATE-DO-NOT-USE-typography-heading-sm-line-height)'\n }}`,\n md: cssProps`${{\n fontSize: 'var(--oj-c-PRIVATE-DO-NOT-USE-typography-heading-md-font-size)',\n fontWeight: 'var(--oj-c-PRIVATE-DO-NOT-USE-typography-heading-md-font-weight)',\n lineHeight: 'var(--oj-c-PRIVATE-DO-NOT-USE-typography-heading-md-line-height)'\n }}`,\n lg: cssProps`${{\n fontSize: `var(--oj-c-PRIVATE-DO-NOT-USE-typography-heading-lg-font-size)`,\n fontWeight: 'var(--oj-c-PRIVATE-DO-NOT-USE-typography-heading-lg-font-weight)',\n lineHeight: 'var(--oj-c-PRIVATE-DO-NOT-USE-typography-heading-lg-line-height)'\n }}`,\n xl: cssProps`${{\n fontSize: 'var(--oj-c-PRIVATE-DO-NOT-USE-typography-heading-xl-font-size)',\n fontWeight: 'var(--oj-c-PRIVATE-DO-NOT-USE-typography-heading-xl-font-weight)',\n lineHeight: 'var(--oj-c-PRIVATE-DO-NOT-USE-typography-heading-xl-line-height)'\n }}`,\n '2xl': cssProps`${{\n fontSize: 'var(--oj-c-PRIVATE-DO-NOT-USE-typography-heading-2xl-font-size)',\n fontWeight: 'var(--oj-c-PRIVATE-DO-NOT-USE-typography-heading-2xl-font-weight)',\n lineHeight: 'var(--oj-c-PRIVATE-DO-NOT-USE-typography-heading-2xl-line-height)'\n }}`,\n inherit: cssProps`${{\n fontSize: 'inherit',\n fontWeight: 'inherit',\n lineHeight: 'inherit'\n }}`\n },\n\n childrenMargins: cssProps`${{\n /* @ts-ignore */\n '& > *': {\n marginTop: '0 !important',\n marginBottom: '0 !important',\n marginLeft: '0 !important',\n marginRight: '0 !important'\n }\n }}`\n};\n\nexport const sizeOptions = keys(styles.size);\n\nconst interpolations = [\n () => ({ class: styles.base }),\n ({ size = '2xl' }: Pick<HeadingProps, 'size'>) => ({\n class: styles.size[size]\n })\n];\n\nconst styleInterpolations = mergeInterpolations<Omit<HeadingProps, 'children'>>(interpolations);\n\nexport function Heading({ children, ...props }: HeadingProps) {\n const Component = props.as;\n //@ts-ignore\n props.size = props.size ?? headingsizeMap[Component];\n const { class: cls, ...style } = styleInterpolations(props);\n return (\n <Component className={cls} style={style} id={props.id}>\n <span className={styles.childrenMargins}>{children}</span>\n </Component>\n );\n}\n"],"names":["headingElementTypes","stringLiteralArray","headingsizeMap","h1","h2","h3","h4","h5","h6","styles","size","sizeOptions","keys","interpolations","class","styleInterpolations","mergeInterpolations","_a","children","props","__rest","Component","as","_b","_c","cls","style","_jsx","Object","assign","className","id","jsx","childrenMargins"],"mappings":"uMAMAA,EAAAC,EAAAA,mBAAA,CAAA,KAAA,KAAA,KAAA,KAAA,KAAA,OA0BAC,EAAA,CACEC,GAAA,MACAC,GAAA,KACAC,GAAA,KACAC,GAAA,KACAC,GAAA,KACAC,GAAA,MAGFC,EAAA,MAAA,SAIEC,KAAA,IAAA,cAAA,YAAA,cAAA,YAAA,iBAAA,sDAiDFC,EAAAC,EAAAA,OAAAH,EAAAC,MAEAG,EAAA,0CAGIC,MAAAL,EAAAC,KAAAA,MAIJK,EAAAC,EAAAA,oBAAAH,aAEA,SAAAI,UAAwBC,SAAAA,GAAAD,EAAAE,EAAAC,EAAAA,OAAAH,EAAA,CAAA,aACtB,MAAAI,EAAAF,EAAAG,GAEAH,EAAAT,KAAA,QAAAa,EAAAJ,EAAAT,YAAA,IAAAa,EAAAA,EAAArB,EAAAmB,GACA,MAAAG,EAAAT,EAAAI,IAAAL,MAAAW,GAAAD,EAAAE,EAAAN,EAAAA,OAAAI,EAAA,CAAA,UACA,OAAAG,MAAAN,EAAAO,OAAAC,OAAA,CAAAC,UAAAL,EAAAC,MAAAA,EAAAK,GAAAZ,EAAAY,IAAA,CAAAb,SAAAS,EAAAK,IAAA,OAAAJ,OAAAC,OAAA,CAAAC,UAAArB,EAAAwB,iBAAA,CAAAf,SAAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HiddenAccessible-
|
|
1
|
+
{"version":3,"file":"HiddenAccessible-c1b8ec8e.js","sources":["../../src/UNSAFE_HiddenAccessible/HiddenAccessible.tsx"],"sourcesContent":["import { ComponentChildren } from 'preact';\nimport { cssProps } from '@oracle/oraclejet-cssprops';\n\nconst hiddenAccessibleStyle = cssProps`${{\n border: 0,\n clip: 'rect(0 0 0 0)',\n height: '1px',\n margin: '-1px',\n overflowX: 'hidden',\n overflowY: 'hidden',\n paddingTop: 0,\n paddingRight: 0,\n paddingBottom: 0,\n paddingLeft: 0,\n width: '1px',\n position: 'absolute'\n}}`;\n\ntype HiddenAccessibleProps = {\n /**\n * Specifies the ComponentChildren\n */\n children?: ComponentChildren;\n};\n\n/**\n * HiddenAccessible is a helper component that hides its children visually,\n * but keeps them visible to screen readers.\n *\n */\nfunction HiddenAccessible({ children }: HiddenAccessibleProps) {\n return <span class={hiddenAccessibleStyle}>{children}</span>;\n}\n\nexport { HiddenAccessible };\n"],"names":["children","_jsx","Object","assign","class"],"mappings":"kGA8BA,UAAAA,SAAAA,IACE,OAAAC,MAAA,OAAAC,OAAAC,OAAA,CAAAC,MA5BF,WA4BE,CAAAJ,SAAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
define(["exports","preact/jsx-runtime","preact",'module'],function(e,n,t,r){"use strict";const c="
|
|
2
|
-
//# sourceMappingURL=HighlightText-
|
|
1
|
+
define(["exports","preact/jsx-runtime","preact",'module'],function(e,n,t,r){"use strict";const c="_1aranwc";const i="__@@__",s="__@@__$&__@@__";e.HighlightText=function({children:e="",matchText:r=""}){return function(e,r){if(r.length>0&&e.length>0){const a=r.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&"),_=e.replace(new RegExp(a,"gi"),s).split(i).map((e,t)=>t%2==0?e:n.jsx("span",Object.assign({class:c},{children:e})));return n.jsx(t.Fragment,{children:_})}return n.jsx(t.Fragment,{children:e})}(e,r)}});
|
|
2
|
+
//# sourceMappingURL=HighlightText-cc2d6b7d.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HighlightText-
|
|
1
|
+
{"version":3,"file":"HighlightText-cc2d6b7d.js","sources":["../../src/UNSAFE_HighlightText/HighlightText.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { Fragment } from 'preact';\nimport { cssProps } from '@oracle/oraclejet-cssprops';\n\nconst highlightStyles = cssProps`${{\n fontWeight: 700\n}}`;\n\ntype Props = {\n /**\n * The text string to apply highlighting to.\n */\n children?: string;\n /**\n * The text string to match.\n */\n matchText?: string;\n};\n\n/**\n * Renders a text string with highlighting applied to the given text to match.\n */\nexport function HighlightText({ children = '', matchText = '' }: Props) {\n return highlighter(children, matchText);\n}\n\nconst HIGHLIGHT_TOKEN = '__@@__';\nconst HIGHLIGHT_PATTERN = `${HIGHLIGHT_TOKEN}$&${HIGHLIGHT_TOKEN}`;\n\nfunction highlighter(unhighlightedText: string, matchText: string) {\n if (matchText.length > 0 && unhighlightedText.length > 0) {\n const escapedMatchText = escapeRegExp(matchText);\n const highlightedText = unhighlightedText.replace(\n new RegExp(escapedMatchText, 'gi'),\n HIGHLIGHT_PATTERN\n );\n const tokens = highlightedText.split(HIGHLIGHT_TOKEN);\n const nodes = tokens.map((current, index) =>\n index % 2 == 0 ? current : <span class={highlightStyles}>{current}</span>\n );\n return <Fragment>{nodes}</Fragment>;\n }\n return <Fragment>{unhighlightedText}</Fragment>;\n}\n\nfunction escapeRegExp(str: string) {\n // copied from:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping\n return str.replace(/[.*+\\-?^${}()|[\\]\\\\]/g, '\\\\$&'); // $& means the whole matched string\n}\n"],"names":["highlightStyles","HIGHLIGHT_TOKEN","HIGHLIGHT_PATTERN","children","matchText","unhighlightedText","escapedMatchText","nodes","replace","RegExp","map","current","index","_jsx","Object","assign","class","Fragment","highlighter"],"mappings":"0FAWA,MAAAA,EAAA,WAsBA,MAAAC,EAAA,SACAC,EAAA,iCALA,UAAAC,SAAAA,EAAA,GAAAC,UAAAA,EAAA,KACE,OAMF,SAAAC,EAAAD,8BAEI,MAAAE,EAAAF,0CAMAG,EALAF,EAAAG,QAAA,IAAAC,OAAAH,EAAA,MAAAJ,YAKAQ,IAAA,CAAAC,EAAAC,IAAAA,EAAA,GAAA,EAAAD,EAAAE,EAAAA,IAAA,OAAAC,OAAAC,OAAA,CAAAC,MAAAhB,GAAA,CAAAG,SAAAQ,MAGA,OAAAE,EAAAA,IAAAI,EAAAA,SAAA,CAAAd,SAAAI,IAEF,OAAAM,EAAAA,IAAAI,EAAAA,SAAA,CAAAd,SAAAE,IAnBAa,CAAAf,EAAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
define(["exports","./tslib.es6-d809b4dd","preact/jsx-runtime","preact",'module',"./utils/UNSAFE_size","./hooks/UNSAFE_useTooltip"],function(e,s,i,t,n,o,c){"use strict";const l=e=>{var{accessibleLabel:t}=e,n=s.__rest(e,["accessibleLabel"]);return t?i.jsx(a,Object.assign({accessibleLabel:t},n)):i.jsx(r,Object.assign({},n))},r=e=>i.jsx("svg",Object.assign({},e)),a=e=>{var{accessibleLabel:n,children:o}=e,l=s.__rest(e,["accessibleLabel","children"]);const{tooltipContent:r,tooltipProps:a}=c.useTooltip({text:n,anchor:{x:"element",y:"element"},position:"bottom",offset:{mainAxis:8,crossAxis:0}});return i.jsxs(t.Fragment,{children:[i.jsx("svg",Object.assign({role:"img"},l,a,{"aria-label":n},{children:o})),r]})},b={primary:"_1wdulsi",secondary:"_1u2non1",disabled:"wift1e",danger:"ooo6gh",warning:"sh2jnx",success:"d25din",info:"_2bdy1g",currentColor:"jy5bp8"};e.Icon=({size:e="1em",color:s="currentColor",accessibleLabel:t="",viewBox:n="none",children:c})=>i.jsx(l,Object.assign({height:"1em",width:"1em",viewBox:n,accessibleLabel:t,class:b[s],style:{fontSize:"1em"===e?e:`${o.sizeToCSS(e)}`}},{children:c}))});
|
|
2
|
+
//# sourceMappingURL=Icon-597b4544.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon-
|
|
1
|
+
{"version":3,"file":"Icon-597b4544.js","sources":["../../src/UNSAFE_Icon/Icon.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * Licensed under The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\nimport { JSX, Fragment } from 'preact';\nimport { cssProps } from '@oracle/oraclejet-cssprops';\nimport { Size, sizeToCSS } from '../utils/UNSAFE_size';\nimport { useTooltip } from '../hooks/UNSAFE_useTooltip';\n\ntype IntrinsicProps = JSX.SVGAttributes<SVGSVGElement>;\n\ntype Props = Pick<IntrinsicProps, 'viewBox' | 'children'> & {\n /**\n * The size of the component. Defaults to '1em', which means the font size of the parent is used.\n */\n size?: Size | '1em';\n /**\n * The color of the component. Defaults to 'currentColor', which behaves like the CSS 'currentColor' value.\n */\n color?: keyof typeof colorStyles;\n /**\n * A label to be used for accessibility purposes.\n */\n accessibleLabel?: string;\n};\n\nexport const Icon = ({\n size = '1em',\n color = 'currentColor',\n accessibleLabel = '',\n viewBox = 'none',\n children\n}: Props) => (\n <Svg\n height=\"1em\"\n width=\"1em\"\n viewBox={viewBox}\n accessibleLabel={accessibleLabel}\n class={colorStyles[color]}\n style={{ fontSize: size === '1em' ? size : `${sizeToCSS(size)}` }}>\n {children}\n </Svg>\n);\n\ntype BaseSvgProps = Pick<\n IntrinsicProps,\n 'height' | 'width' | 'viewBox' | 'class' | 'children' | 'style'\n>;\ntype SvgProps = BaseSvgProps & {\n accessibleLabel: string;\n};\n\nconst Svg = ({ accessibleLabel, ...otherProps }: SvgProps) =>\n accessibleLabel ? (\n <SemanticSvg accessibleLabel={accessibleLabel} {...otherProps} />\n ) : (\n <DecorativeSvg {...otherProps} />\n );\n\nconst DecorativeSvg = (props: BaseSvgProps) => <svg {...props} />;\n\nconst SemanticSvg = ({ accessibleLabel, children, ...props }: SvgProps) => {\n const { tooltipContent, tooltipProps } = useTooltip({\n text: accessibleLabel,\n anchor: {\n x: 'element',\n y: 'element'\n },\n position: 'bottom',\n offset: {\n mainAxis: 8, // redwood tooltip design spec\n crossAxis: 0\n }\n });\n\n return (\n <Fragment>\n <svg role=\"img\" {...props} {...tooltipProps} aria-label={accessibleLabel}>\n {children}\n </svg>\n {tooltipContent}\n </Fragment>\n );\n};\n\nconst colorStyles = {\n primary: cssProps`${{\n color: 'var(--oj-c-PRIVATE-DO-NOT-USE-core-text-color-primary)'\n }}`,\n secondary: cssProps`${{\n color: 'var(--oj-c-PRIVATE-DO-NOT-USE-core-text-color-secondary)'\n }}`,\n disabled: cssProps`${{\n color: 'var(--oj-c-PRIVATE-DO-NOT-USE-core-text-color-disabled)'\n }}`,\n danger: cssProps`${{\n color: 'var(--oj-c-PRIVATE-DO-NOT-USE-core-danger-3)'\n }}`,\n warning: cssProps`${{\n color: 'var(--oj-c-PRIVATE-DO-NOT-USE-core-warning-3)'\n }}`,\n success: cssProps`${{\n color: 'var(--oj-c-PRIVATE-DO-NOT-USE-core-success-3)'\n }}`,\n info: cssProps`${{\n color: 'var(--oj-c-PRIVATE-DO-NOT-USE-core-info-3)'\n }}`,\n currentColor: cssProps`${{\n color: 'currentColor'\n }}`\n};\n"],"names":["Icon","Svg","_a","accessibleLabel","otherProps","__rest","DecorativeSvg","props","_jsx","Object","assign","SemanticSvg","tooltipContent","tooltipProps","useTooltip","text","anchor","x","y","position","offset","mainAxis","crossAxis","colorStyles","size","color","viewBox","children","height","width","class","style","fontSize","sizeToCSS"],"mappings":"yKA6BAA,MA0BAC,EAAAC,IAAa,IAAAC,gBAAAA,GAAAD,EAAAE,EAAAC,EAAAA,OAAAH,EAAA,CAAA,yGAObI,EAAAC,GAAAC,EAAAA,IAAA,MAAAC,OAAAC,OAAA,GAAAH,IAEAI,EAAAT,qFACE,MAAAU,eAAAA,EAAAC,aAAAA,GAAAC,aAAA,CACEC,KAAAZ,EACAa,OAAA,CACEC,EAAA,UACAC,EAAA,WAEFC,SAAA,SACAC,OAAA,CACEC,SAAA,EACAC,UAAA,0HAcNC,EAAA,SAAA,qBAAA,oBAAA,gBAAA,iBAAA,iBAAA,cAAA,wCA3DA,EAAAC,KAAAA,EAAA,MAAAC,MAAAA,EAAA,eAAAtB,gBAAAA,EAAA,GAAAuB,QAAAA,EAAA,OAAAC,SAAAA,KAAAnB,MAAAP,EAAAQ,OAAAC,OAAA,CAAAkB,OAAA,MAAAC,MAAA,MAAAH,QAAAA,EAAAvB,gBAAAA,EAAA2B,MAAAP,EAAAE,GAAAM,MAAA,CAAAC,SAAA,QAAAR,EAAAA,EAAA,GAAAS,EAAAA,UAAAT,OAAA,CAAAG,SAAAA"}
|