@edifice.io/react 2.0.0-develop-rc.4 → 2.0.0-develop-rc.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/README.md +17 -88
- package/dist/audience.js +15 -14
- package/dist/audience.js.map +1 -0
- package/dist/components/ActionBar/ActionBar.js +8 -7
- package/dist/components/ActionBar/ActionBar.js.map +1 -0
- package/dist/components/Alert/Alert.js +62 -61
- package/dist/components/Alert/Alert.js.map +1 -0
- package/dist/components/AppHeader/AppHeader.js +19 -18
- package/dist/components/AppHeader/AppHeader.js.map +1 -0
- package/dist/components/AppIcon/AppIcon.d.ts +1 -1
- package/dist/components/AppIcon/AppIcon.js +45 -44
- package/dist/components/AppIcon/AppIcon.js.map +1 -0
- package/dist/components/Attachment/Attachment.js +14 -13
- package/dist/components/Attachment/Attachment.js.map +1 -0
- package/dist/components/Avatar/Avatar.js +28 -27
- package/dist/components/Avatar/Avatar.js.map +1 -0
- package/dist/components/Badge/Badge.js +21 -20
- package/dist/components/Badge/Badge.js.map +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.js +24 -23
- package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -0
- package/dist/components/Breadcrumb/BreadcrumbItem.js +12 -11
- package/dist/components/Breadcrumb/BreadcrumbItem.js.map +1 -0
- package/dist/components/Breadcrumb/BreadcrumbList.js +11 -10
- package/dist/components/Breadcrumb/BreadcrumbList.js.map +1 -0
- package/dist/components/Breadcrumb/BreadcrumbNav.d.ts +1 -1
- package/dist/components/Breadcrumb/BreadcrumbNav.js +16 -15
- package/dist/components/Breadcrumb/BreadcrumbNav.js.map +1 -0
- package/dist/components/Button/Button.js +33 -32
- package/dist/components/Button/Button.js.map +1 -0
- package/dist/components/Button/IconButton.js +16 -15
- package/dist/components/Button/IconButton.js.map +1 -0
- package/dist/components/Button/SearchButton.js +16 -15
- package/dist/components/Button/SearchButton.js.map +1 -0
- package/dist/components/Card/Card.d.ts +1 -1
- package/dist/components/Card/Card.js +48 -47
- package/dist/components/Card/Card.js.map +1 -0
- package/dist/components/Card/CardBody.js +14 -13
- package/dist/components/Card/CardBody.js.map +1 -0
- package/dist/components/Card/CardContext.d.ts +1 -1
- package/dist/components/Card/CardContext.js +8 -7
- package/dist/components/Card/CardContext.js.map +1 -0
- package/dist/components/Card/CardFooter.js +6 -5
- package/dist/components/Card/CardFooter.js.map +1 -0
- package/dist/components/Card/CardHeader.js +15 -14
- package/dist/components/Card/CardHeader.js.map +1 -0
- package/dist/components/Card/CardImage.js +14 -13
- package/dist/components/Card/CardImage.js.map +1 -0
- package/dist/components/Card/CardText.js +9 -8
- package/dist/components/Card/CardText.js.map +1 -0
- package/dist/components/Card/CardTitle.js +9 -8
- package/dist/components/Card/CardTitle.js.map +1 -0
- package/dist/components/Card/CardUser.js +9 -8
- package/dist/components/Card/CardUser.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.js +31 -30
- package/dist/components/Checkbox/Checkbox.js.map +1 -0
- package/dist/components/ColorPicker/ColorPalette.js +5 -4
- package/dist/components/ColorPicker/ColorPalette.js.map +1 -0
- package/dist/components/ColorPicker/ColorPicker.js +29 -28
- package/dist/components/ColorPicker/ColorPicker.js.map +1 -0
- package/dist/components/ColorPicker/ColorPickerItem.js +12 -11
- package/dist/components/ColorPicker/ColorPickerItem.js.map +1 -0
- package/dist/components/Combobox/Combobox.js +36 -35
- package/dist/components/Combobox/Combobox.js.map +1 -0
- package/dist/components/Combobox/ComboboxTrigger.js +22 -21
- package/dist/components/Combobox/ComboboxTrigger.js.map +1 -0
- package/dist/components/Dropdown/Dropdown.js +56 -55
- package/dist/components/Dropdown/Dropdown.js.map +1 -0
- package/dist/components/Dropdown/DropdownCheckboxItem.js +27 -26
- package/dist/components/Dropdown/DropdownCheckboxItem.js.map +1 -0
- package/dist/components/Dropdown/DropdownContext.js +8 -7
- package/dist/components/Dropdown/DropdownContext.js.map +1 -0
- package/dist/components/Dropdown/DropdownItem.js +28 -27
- package/dist/components/Dropdown/DropdownItem.js.map +1 -0
- package/dist/components/Dropdown/DropdownMenu.js +22 -21
- package/dist/components/Dropdown/DropdownMenu.js.map +1 -0
- package/dist/components/Dropdown/DropdownMenuGroup.js +10 -9
- package/dist/components/Dropdown/DropdownMenuGroup.js.map +1 -0
- package/dist/components/Dropdown/DropdownRadioItem.js +27 -26
- package/dist/components/Dropdown/DropdownRadioItem.js.map +1 -0
- package/dist/components/Dropdown/DropdownSeparator.js +4 -3
- package/dist/components/Dropdown/DropdownSeparator.js.map +1 -0
- package/dist/components/Dropdown/DropdownTrigger.js +29 -28
- package/dist/components/Dropdown/DropdownTrigger.js.map +1 -0
- package/dist/components/Dropzone/Dropzone.js +48 -47
- package/dist/components/Dropzone/Dropzone.js.map +1 -0
- package/dist/components/Dropzone/DropzoneContext.js +9 -8
- package/dist/components/Dropzone/DropzoneContext.js.map +1 -0
- package/dist/components/Dropzone/DropzoneDrag.js +8 -7
- package/dist/components/Dropzone/DropzoneDrag.js.map +1 -0
- package/dist/components/Dropzone/DropzoneFile.js +26 -25
- package/dist/components/Dropzone/DropzoneFile.js.map +1 -0
- package/dist/components/Dropzone/DropzoneImport.js +21 -20
- package/dist/components/Dropzone/DropzoneImport.js.map +1 -0
- package/dist/components/EmptyScreen/EmptyScreen.js +17 -16
- package/dist/components/EmptyScreen/EmptyScreen.js.map +1 -0
- package/dist/components/FileCard/FileCard.d.ts +1 -1
- package/dist/components/FileCard/FileCard.js +38 -37
- package/dist/components/FileCard/FileCard.js.map +1 -0
- package/dist/components/FileCard/FileIcon.d.ts +1 -1
- package/dist/components/FileCard/FileIcon.js +12 -11
- package/dist/components/FileCard/FileIcon.js.map +1 -0
- package/dist/components/Form/FormContext.js +8 -7
- package/dist/components/Form/FormContext.js.map +1 -0
- package/dist/components/Form/FormControl.js +31 -30
- package/dist/components/Form/FormControl.js.map +1 -0
- package/dist/components/Form/FormText.js +13 -12
- package/dist/components/Form/FormText.js.map +1 -0
- package/dist/components/Grid/Grid.js +28 -27
- package/dist/components/Grid/Grid.js.map +1 -0
- package/dist/components/Heading/Heading.js +15 -14
- package/dist/components/Heading/Heading.js.map +1 -0
- package/dist/components/Icon/Icon.js +9 -8
- package/dist/components/Icon/Icon.js.map +1 -0
- package/dist/components/Image/Image.js +40 -39
- package/dist/components/Image/Image.js.map +1 -0
- package/dist/components/ImagePicker/ImagePicker.d.ts +1 -1
- package/dist/components/ImagePicker/ImagePicker.js +52 -51
- package/dist/components/ImagePicker/ImagePicker.js.map +1 -0
- package/dist/components/Input/Input.js +29 -28
- package/dist/components/Input/Input.js.map +1 -0
- package/dist/components/Label/Label.js +31 -30
- package/dist/components/Label/Label.js.map +1 -0
- package/dist/components/Loading/Loading.js +24 -23
- package/dist/components/Loading/Loading.js.map +1 -0
- package/dist/components/LoadingScreen/LoadingScreen.js +21 -20
- package/dist/components/LoadingScreen/LoadingScreen.js.map +1 -0
- package/dist/components/Logo/Logo.js +13 -12
- package/dist/components/Logo/Logo.js.map +1 -0
- package/dist/components/Menu/Menu.js +40 -39
- package/dist/components/Menu/Menu.js.map +1 -0
- package/dist/components/Menu/MenuButton.js +18 -17
- package/dist/components/Menu/MenuButton.js.map +1 -0
- package/dist/components/Menu/MenuContext.js +9 -8
- package/dist/components/Menu/MenuContext.js.map +1 -0
- package/dist/components/Menu/MenuItem.js +15 -14
- package/dist/components/Menu/MenuItem.js.map +1 -0
- package/dist/components/Modal/Modal.js +50 -49
- package/dist/components/Modal/Modal.js.map +1 -0
- package/dist/components/Modal/ModalBody.js +12 -11
- package/dist/components/Modal/ModalBody.js.map +1 -0
- package/dist/components/Modal/ModalContext.js +9 -8
- package/dist/components/Modal/ModalContext.js.map +1 -0
- package/dist/components/Modal/ModalFooter.js +4 -3
- package/dist/components/Modal/ModalFooter.js.map +1 -0
- package/dist/components/Modal/ModalHeader.js +23 -22
- package/dist/components/Modal/ModalHeader.js.map +1 -0
- package/dist/components/Modal/ModalSubtitle.js +4 -3
- package/dist/components/Modal/ModalSubtitle.js.map +1 -0
- package/dist/components/Popover/Popover.js +34 -33
- package/dist/components/Popover/Popover.js.map +1 -0
- package/dist/components/Radio/Radio.js +27 -26
- package/dist/components/Radio/Radio.js.map +1 -0
- package/dist/components/SearchBar/SearchBar.js +30 -29
- package/dist/components/SearchBar/SearchBar.js.map +1 -0
- package/dist/components/Select/Select.js +32 -31
- package/dist/components/Select/Select.js.map +1 -0
- package/dist/components/Select/SelectTrigger.js +5 -4
- package/dist/components/Select/SelectTrigger.js.map +1 -0
- package/dist/components/Table/TableExplorer.js +8 -7
- package/dist/components/Table/TableExplorer.js.map +1 -0
- package/dist/components/Tabs/Tabs.js +59 -58
- package/dist/components/Tabs/Tabs.js.map +1 -0
- package/dist/components/Tabs/TabsContext.js +9 -8
- package/dist/components/Tabs/TabsContext.js.map +1 -0
- package/dist/components/Tabs/TabsItem.js +21 -20
- package/dist/components/Tabs/TabsItem.js.map +1 -0
- package/dist/components/Tabs/TabsList.js +19 -18
- package/dist/components/Tabs/TabsList.js.map +1 -0
- package/dist/components/Tabs/TabsPanel.js +10 -9
- package/dist/components/Tabs/TabsPanel.js.map +1 -0
- package/dist/components/TextArea/TextArea.js +32 -31
- package/dist/components/TextArea/TextArea.js.map +1 -0
- package/dist/components/TextArea/TextareaCounter.js +7 -6
- package/dist/components/TextArea/TextareaCounter.js.map +1 -0
- package/dist/components/Toolbar/Toolbar.js +61 -60
- package/dist/components/Toolbar/Toolbar.js.map +1 -0
- package/dist/components/Tooltip/Tooltip.js +29 -28
- package/dist/components/Tooltip/Tooltip.js.map +1 -0
- package/dist/components/TreeView/TreeItem.js +47 -46
- package/dist/components/TreeView/TreeItem.js.map +1 -0
- package/dist/components/TreeView/TreeView.js +34 -33
- package/dist/components/TreeView/TreeView.js.map +1 -0
- package/dist/components/TreeView/hooks/useTreeItemEvents.js +19 -18
- package/dist/components/TreeView/hooks/useTreeItemEvents.js.map +1 -0
- package/dist/components/UploadCard/UploadCard.js +53 -52
- package/dist/components/UploadCard/UploadCard.js.map +1 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.js +8 -7
- package/dist/components/VisuallyHidden/VisuallyHidden.js.map +1 -0
- package/dist/core/OdeClientProvider/OdeClientProvider.d.ts +1 -1
- package/dist/core/OdeClientProvider/OdeClientProvider.js +45 -44
- package/dist/core/OdeClientProvider/OdeClientProvider.js.map +1 -0
- package/dist/core/ThemeProvider/ThemeProvider.d.ts +1 -1
- package/dist/core/ThemeProvider/ThemeProvider.js +36 -35
- package/dist/core/ThemeProvider/ThemeProvider.js.map +1 -0
- package/dist/core/useAvatar/useAvatar.d.ts +1 -1
- package/dist/core/useAvatar/useAvatar.js +22 -21
- package/dist/core/useAvatar/useAvatar.js.map +1 -0
- package/dist/core/useBookmark/useBookmark.d.ts +1 -1
- package/dist/core/useBookmark/useBookmark.js +10 -9
- package/dist/core/useBookmark/useBookmark.js.map +1 -0
- package/dist/core/useConf/useConf.d.ts +1 -1
- package/dist/core/useConf/useConf.js +8 -7
- package/dist/core/useConf/useConf.js.map +1 -0
- package/dist/core/useConversation/useConversation.js +30 -29
- package/dist/core/useConversation/useConversation.js.map +1 -0
- package/dist/core/useCookiesConsent/useCookiesConsent.js +17 -16
- package/dist/core/useCookiesConsent/useCookiesConsent.js.map +1 -0
- package/dist/core/useDate/useDate.js +36 -35
- package/dist/core/useDate/useDate.js.map +1 -0
- package/dist/core/useHasWorkflow/useHasWorkflow.js +16 -15
- package/dist/core/useHasWorkflow/useHasWorkflow.js.map +1 -0
- package/dist/core/useHeader/useHeader.d.ts +1 -1
- package/dist/core/useHeader/useHeader.js +42 -41
- package/dist/core/useHeader/useHeader.js.map +1 -0
- package/dist/core/useHttpErrorToast/useHttpErrorToast.js +18 -17
- package/dist/core/useHttpErrorToast/useHttpErrorToast.js.map +1 -0
- package/dist/core/useIsAdml/useIsAdml.js +12 -11
- package/dist/core/useIsAdml/useIsAdml.js.map +1 -0
- package/dist/core/useLibraryUrl/useLibraryUrl.js +17 -16
- package/dist/core/useLibraryUrl/useLibraryUrl.js.map +1 -0
- package/dist/core/useMediaLibrary/useMediaLibrary.d.ts +1 -1
- package/dist/core/useMediaLibrary/useMediaLibrary.js +33 -32
- package/dist/core/useMediaLibrary/useMediaLibrary.js.map +1 -0
- package/dist/core/useOdeIcons/useOdeIcons.d.ts +1 -1
- package/dist/core/useOdeIcons/useOdeIcons.js +38 -37
- package/dist/core/useOdeIcons/useOdeIcons.js.map +1 -0
- package/dist/core/usePaths/usePaths.js +3 -2
- package/dist/core/usePaths/usePaths.js.map +1 -0
- package/dist/core/usePreferences/usePreferences.js +6 -5
- package/dist/core/usePreferences/usePreferences.js.map +1 -0
- package/dist/core/useResource/useResource.d.ts +1 -1
- package/dist/core/useResource/useResource.js +15 -14
- package/dist/core/useResource/useResource.js.map +1 -0
- package/dist/core/useResourceSearch/useResourceSearch.d.ts +1 -1
- package/dist/core/useResourceSearch/useResourceSearch.js +23 -22
- package/dist/core/useResourceSearch/useResourceSearch.js.map +1 -0
- package/dist/core/useSession/useSession.js +7 -6
- package/dist/core/useSession/useSession.js.map +1 -0
- package/dist/core/useTrashedResource/useTrashedResource.js +19 -18
- package/dist/core/useTrashedResource/useTrashedResource.js.map +1 -0
- package/dist/core/useUpload/useUpload.d.ts +1 -1
- package/dist/core/useUpload/useUpload.js +69 -68
- package/dist/core/useUpload/useUpload.js.map +1 -0
- package/dist/core/useUploadFiles/useUploadFiles.d.ts +1 -1
- package/dist/core/useUploadFiles/useUploadFiles.js +83 -82
- package/dist/core/useUploadFiles/useUploadFiles.js.map +1 -0
- package/dist/core/useUser/useUser.d.ts +1 -1
- package/dist/core/useUser/useUser.js +16 -15
- package/dist/core/useUser/useUser.js.map +1 -0
- package/dist/core/useWorkspaceFile/useWorkspaceFile.d.ts +1 -1
- package/dist/core/useWorkspaceFile/useWorkspaceFile.js +32 -31
- package/dist/core/useWorkspaceFile/useWorkspaceFile.js.map +1 -0
- package/dist/core/useWorkspaceSearch/useWorkspaceSearch.d.ts +1 -1
- package/dist/core/useWorkspaceSearch/useWorkspaceSearch.js +42 -41
- package/dist/core/useWorkspaceSearch/useWorkspaceSearch.js.map +1 -0
- package/dist/core/useXitiTrackPageLoad/useXitiTrackPageLoad.js +18 -17
- package/dist/core/useXitiTrackPageLoad/useXitiTrackPageLoad.js.map +1 -0
- package/dist/core/useZendeskGuide/useZendeskGuide.js +47 -46
- package/dist/core/useZendeskGuide/useZendeskGuide.js.map +1 -0
- package/dist/editor.js +57 -56
- package/dist/editor.js.map +1 -0
- package/dist/hooks/useBrowserInfo/useBrowserInfo.js +12 -11
- package/dist/hooks/useBrowserInfo/useBrowserInfo.js.map +1 -0
- package/dist/hooks/useClickOutside/useClickOutside.js +19 -18
- package/dist/hooks/useClickOutside/useClickOutside.js.map +1 -0
- package/dist/hooks/useDebounce/useDebounce.js +11 -10
- package/dist/hooks/useDebounce/useDebounce.js.map +1 -0
- package/dist/hooks/useDropdown/useDropdown.d.ts +1 -1
- package/dist/hooks/useDropdown/useDropdown.js +97 -96
- package/dist/hooks/useDropdown/useDropdown.js.map +1 -0
- package/dist/hooks/useDropzone/useDropzone.js +54 -53
- package/dist/hooks/useDropzone/useDropzone.js.map +1 -0
- package/dist/hooks/useHover/useHover.js +15 -14
- package/dist/hooks/useHover/useHover.js.map +1 -0
- package/dist/hooks/useImage/useImage.js +14 -13
- package/dist/hooks/useImage/useImage.js.map +1 -0
- package/dist/hooks/useImageResizer/useImageResizer.js +32 -31
- package/dist/hooks/useImageResizer/useImageResizer.js.map +1 -0
- package/dist/hooks/useKeyPress/useKeyPress.js +11 -10
- package/dist/hooks/useKeyPress/useKeyPress.js.map +1 -0
- package/dist/hooks/useScrollToTop/useScrollToTop.js +5 -4
- package/dist/hooks/useScrollToTop/useScrollToTop.js.map +1 -0
- package/dist/hooks/useThumbnail/useThumbnail.js +22 -21
- package/dist/hooks/useThumbnail/useThumbnail.js.map +1 -0
- package/dist/hooks/useTitle/useTitle.js +8 -7
- package/dist/hooks/useTitle/useTitle.js.map +1 -0
- package/dist/hooks/useToast/useToast.js +26 -25
- package/dist/hooks/useToast/useToast.js.map +1 -0
- package/dist/hooks/useToggle/useToggle.js +7 -6
- package/dist/hooks/useToggle/useToggle.js.map +1 -0
- package/dist/hooks/useTrapFocus/useTrapFocus.js +12 -11
- package/dist/hooks/useTrapFocus/useTrapFocus.js.map +1 -0
- package/dist/index.js +226 -225
- package/dist/index.js.map +1 -0
- package/dist/modals.js +15 -14
- package/dist/modals.js.map +1 -0
- package/dist/modules/audience/ReactionChoice.d.ts +1 -1
- package/dist/modules/audience/ReactionChoice.js +25 -24
- package/dist/modules/audience/ReactionChoice.js.map +1 -0
- package/dist/modules/audience/ReactionModal.Card.d.ts +1 -1
- package/dist/modules/audience/ReactionModal.Card.js +26 -25
- package/dist/modules/audience/ReactionModal.Card.js.map +1 -0
- package/dist/modules/audience/ReactionModal.d.ts +1 -1
- package/dist/modules/audience/ReactionModal.js +59 -59
- package/dist/modules/audience/ReactionModal.js.map +1 -0
- package/dist/modules/audience/ReactionSummary.d.ts +1 -1
- package/dist/modules/audience/ReactionSummary.js +20 -19
- package/dist/modules/audience/ReactionSummary.js.map +1 -0
- package/dist/modules/audience/ViewsByProfileCard.d.ts +1 -1
- package/dist/modules/audience/ViewsByProfileCard.js +23 -22
- package/dist/modules/audience/ViewsByProfileCard.js.map +1 -0
- package/dist/modules/audience/ViewsCounter.js +15 -14
- package/dist/modules/audience/ViewsCounter.js.map +1 -0
- package/dist/modules/audience/ViewsModal.d.ts +1 -1
- package/dist/modules/audience/ViewsModal.js +33 -32
- package/dist/modules/audience/ViewsModal.js.map +1 -0
- package/dist/modules/audience/hooks/useReactionIcons.d.ts +1 -1
- package/dist/modules/audience/hooks/useReactionIcons.js +14 -13
- package/dist/modules/audience/hooks/useReactionIcons.js.map +1 -0
- package/dist/modules/audience/hooks/useReactions.d.ts +3 -3
- package/dist/modules/audience/hooks/useReactions.js +25 -24
- package/dist/modules/audience/hooks/useReactions.js.map +1 -0
- package/dist/modules/audience/hooks/useViews.d.ts +2 -2
- package/dist/modules/editor/components/BubbleMenuEditImage/BubbleMenuEditImage.js +60 -59
- package/dist/modules/editor/components/BubbleMenuEditImage/BubbleMenuEditImage.js.map +1 -0
- package/dist/modules/editor/components/Editor/Editor.d.ts +1 -1
- package/dist/modules/editor/components/Editor/Editor.js +71 -70
- package/dist/modules/editor/components/Editor/Editor.js.map +1 -0
- package/dist/modules/editor/components/Editor/MathsModal.d.ts +0 -1
- package/dist/modules/editor/components/Editor/MathsModal.js +38 -37
- package/dist/modules/editor/components/Editor/MathsModal.js.map +1 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.DropdownMenu.js +15 -14
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.DropdownMenu.js.map +1 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Emoji.js +38 -37
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Emoji.js.map +1 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.HighlightColor.js +34 -33
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.HighlightColor.js.map +1 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.PlusMenu.js +13 -12
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.PlusMenu.js.map +1 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextColor.js +37 -36
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextColor.js.map +1 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextSize.js +36 -35
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextSize.js.map +1 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Typography.js +31 -30
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Typography.js.map +1 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.js +96 -95
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.js.map +1 -0
- package/dist/modules/editor/components/NodeView/AttachmentNodeView.js +7 -6
- package/dist/modules/editor/components/NodeView/AttachmentNodeView.js.map +1 -0
- package/dist/modules/editor/components/NodeView/AudioNodeView.js +7 -6
- package/dist/modules/editor/components/NodeView/AudioNodeView.js.map +1 -0
- package/dist/modules/editor/components/NodeView/ImageNodeView.js +7 -6
- package/dist/modules/editor/components/NodeView/ImageNodeView.js.map +1 -0
- package/dist/modules/editor/components/NodeView/LinkerNodeView.js +7 -6
- package/dist/modules/editor/components/NodeView/LinkerNodeView.js.map +1 -0
- package/dist/modules/editor/components/NodeView/VideoNodeView.js +7 -6
- package/dist/modules/editor/components/NodeView/VideoNodeView.js.map +1 -0
- package/dist/modules/editor/components/Renderer/AttachmentRenderer.js +25 -24
- package/dist/modules/editor/components/Renderer/AttachmentRenderer.js.map +1 -0
- package/dist/modules/editor/components/Renderer/AudioRenderer.js +8 -7
- package/dist/modules/editor/components/Renderer/AudioRenderer.js.map +1 -0
- package/dist/modules/editor/components/Renderer/LinkerRenderer.js +27 -26
- package/dist/modules/editor/components/Renderer/LinkerRenderer.js.map +1 -0
- package/dist/modules/editor/components/Renderer/MediaRenderer.js +38 -37
- package/dist/modules/editor/components/Renderer/MediaRenderer.js.map +1 -0
- package/dist/modules/editor/components/Toolbar/LinkToolbar.TippyOptions.js +3 -2
- package/dist/modules/editor/components/Toolbar/LinkToolbar.TippyOptions.js.map +1 -0
- package/dist/modules/editor/components/Toolbar/LinkToolbar.d.ts +1 -1
- package/dist/modules/editor/components/Toolbar/LinkToolbar.js +33 -32
- package/dist/modules/editor/components/Toolbar/LinkToolbar.js.map +1 -0
- package/dist/modules/editor/components/Toolbar/TableToolbar.AddMenu.js +22 -21
- package/dist/modules/editor/components/Toolbar/TableToolbar.AddMenu.js.map +1 -0
- package/dist/modules/editor/components/Toolbar/TableToolbar.CellColor.js +31 -30
- package/dist/modules/editor/components/Toolbar/TableToolbar.CellColor.js.map +1 -0
- package/dist/modules/editor/components/Toolbar/TableToolbar.DelMenu.js +21 -20
- package/dist/modules/editor/components/Toolbar/TableToolbar.DelMenu.js.map +1 -0
- package/dist/modules/editor/components/Toolbar/TableToolbar.d.ts +1 -1
- package/dist/modules/editor/components/Toolbar/TableToolbar.js +42 -41
- package/dist/modules/editor/components/Toolbar/TableToolbar.js.map +1 -0
- package/dist/modules/editor/hooks/useActionOptions.js +48 -47
- package/dist/modules/editor/hooks/useActionOptions.js.map +1 -0
- package/dist/modules/editor/hooks/useCommentEditor.js +28 -27
- package/dist/modules/editor/hooks/useCommentEditor.js.map +1 -0
- package/dist/modules/editor/hooks/useEditorContext.js +9 -8
- package/dist/modules/editor/hooks/useEditorContext.js.map +1 -0
- package/dist/modules/editor/hooks/useImageModal.d.ts +1 -1
- package/dist/modules/editor/hooks/useImageModal.js +33 -32
- package/dist/modules/editor/hooks/useImageModal.js.map +1 -0
- package/dist/modules/editor/hooks/useImageSelection.js +32 -31
- package/dist/modules/editor/hooks/useImageSelection.js.map +1 -0
- package/dist/modules/editor/hooks/useLinkToolbar.js +25 -24
- package/dist/modules/editor/hooks/useLinkToolbar.js.map +1 -0
- package/dist/modules/editor/hooks/useMathsModal.js +10 -9
- package/dist/modules/editor/hooks/useMathsModal.js.map +1 -0
- package/dist/modules/editor/hooks/useMathsStyles.js +14 -13
- package/dist/modules/editor/hooks/useMathsStyles.js.map +1 -0
- package/dist/modules/editor/hooks/useMediaLibraryEditor.d.ts +1 -1
- package/dist/modules/editor/hooks/useMediaLibraryEditor.js +97 -96
- package/dist/modules/editor/hooks/useMediaLibraryEditor.js.map +1 -0
- package/dist/modules/editor/hooks/useResizeMedia.js +32 -31
- package/dist/modules/editor/hooks/useResizeMedia.js.map +1 -0
- package/dist/modules/editor/hooks/useSpeechRecognition.js +13 -12
- package/dist/modules/editor/hooks/useSpeechRecognition.js.map +1 -0
- package/dist/modules/editor/hooks/useSpeechSynthetisis.js +14 -13
- package/dist/modules/editor/hooks/useSpeechSynthetisis.js.map +1 -0
- package/dist/modules/editor/hooks/useTipTapEditor.js +58 -57
- package/dist/modules/editor/hooks/useTipTapEditor.js.map +1 -0
- package/dist/modules/editor/utils/has-extension.js +3 -2
- package/dist/modules/editor/utils/has-extension.js.map +1 -0
- package/dist/modules/editor/utils/has-mark.js +3 -2
- package/dist/modules/editor/utils/has-mark.js.map +1 -0
- package/dist/modules/editor/utils/has-text-style.js +4 -3
- package/dist/modules/editor/utils/has-text-style.js.map +1 -0
- package/dist/modules/modals/OnboardingModal/OnboardingModal.d.ts +0 -1
- package/dist/modules/modals/OnboardingModal/OnboardingModal.js +50 -49
- package/dist/modules/modals/OnboardingModal/OnboardingModal.js.map +1 -0
- package/dist/modules/modals/OnboardingModal/useOnboardingModal.js +19 -18
- package/dist/modules/modals/OnboardingModal/useOnboardingModal.js.map +1 -0
- package/dist/modules/modals/PublishModal/PublishModal.d.ts +1 -1
- package/dist/modules/modals/PublishModal/PublishModal.js +98 -97
- package/dist/modules/modals/PublishModal/PublishModal.js.map +1 -0
- package/dist/modules/modals/PublishModal/components/ActivitiesDropdown.js +20 -19
- package/dist/modules/modals/PublishModal/components/ActivitiesDropdown.js.map +1 -0
- package/dist/modules/modals/PublishModal/components/AgeSelect.js +15 -14
- package/dist/modules/modals/PublishModal/components/AgeSelect.js.map +1 -0
- package/dist/modules/modals/PublishModal/components/LangSelect.js +12 -11
- package/dist/modules/modals/PublishModal/components/LangSelect.js.map +1 -0
- package/dist/modules/modals/PublishModal/components/PublishModalFooter.js +17 -16
- package/dist/modules/modals/PublishModal/components/PublishModalFooter.js.map +1 -0
- package/dist/modules/modals/PublishModal/components/SubjectsDropdown.js +20 -19
- package/dist/modules/modals/PublishModal/components/SubjectsDropdown.js.map +1 -0
- package/dist/modules/modals/PublishModal/components/ToastError.js +18 -17
- package/dist/modules/modals/PublishModal/components/ToastError.js.map +1 -0
- package/dist/modules/modals/PublishModal/components/ToastSuccess.d.ts +1 -1
- package/dist/modules/modals/PublishModal/components/ToastSuccess.js +13 -12
- package/dist/modules/modals/PublishModal/components/ToastSuccess.js.map +1 -0
- package/dist/modules/modals/PublishModal/constants/ageOptions.js +3 -2
- package/dist/modules/modals/PublishModal/constants/ageOptions.js.map +1 -0
- package/dist/modules/modals/PublishModal/hooks/useActivitiesOptions.js +5 -4
- package/dist/modules/modals/PublishModal/hooks/useActivitiesOptions.js.map +1 -0
- package/dist/modules/modals/PublishModal/hooks/useLanguageOptions.js +17 -16
- package/dist/modules/modals/PublishModal/hooks/useLanguageOptions.js.map +1 -0
- package/dist/modules/modals/PublishModal/hooks/usePublishModal.d.ts +1 -1
- package/dist/modules/modals/PublishModal/hooks/usePublishModal.js +80 -79
- package/dist/modules/modals/PublishModal/hooks/usePublishModal.js.map +1 -0
- package/dist/modules/modals/PublishModal/hooks/useSubjectsOptions.js +42 -41
- package/dist/modules/modals/PublishModal/hooks/useSubjectsOptions.js.map +1 -0
- package/dist/modules/modals/ResourceModal/ResourceModal.d.ts +1 -1
- package/dist/modules/modals/ResourceModal/ResourceModal.js +116 -115
- package/dist/modules/modals/ResourceModal/ResourceModal.js.map +1 -0
- package/dist/modules/modals/ResourceModal/apps/BlogPublic.d.ts +1 -1
- package/dist/modules/modals/ResourceModal/apps/BlogPublic.js +48 -47
- package/dist/modules/modals/ResourceModal/apps/BlogPublic.js.map +1 -0
- package/dist/modules/modals/ResourceModal/hooks/useSlug.d.ts +1 -1
- package/dist/modules/modals/ResourceModal/hooks/useSlug.js +33 -32
- package/dist/modules/modals/ResourceModal/hooks/useSlug.js.map +1 -0
- package/dist/modules/modals/ResourceModal/hooks/useThumb.d.ts +1 -1
- package/dist/modules/modals/ResourceModal/hooks/useThumb.js +13 -12
- package/dist/modules/modals/ResourceModal/hooks/useThumb.js.map +1 -0
- package/dist/modules/modals/ResourceModal/hooks/useUpdateMutation.d.ts +1 -1
- package/dist/modules/modals/ResourceModal/hooks/useUpdateMutation.js +11 -10
- package/dist/modules/modals/ResourceModal/hooks/useUpdateMutation.js.map +1 -0
- package/dist/modules/modals/ShareModal/ShareBookmarkLine.d.ts +1 -1
- package/dist/modules/modals/ShareModal/ShareModal.d.ts +1 -1
- package/dist/modules/modals/ShareModal/apps/ShareBlog.d.ts +1 -1
- package/dist/modules/modals/ShareModal/apps/ShareBlog.js +34 -33
- package/dist/modules/modals/ShareModal/apps/ShareBlog.js.map +1 -0
- package/dist/modules/modals/ShareModal/hooks/useSearch.d.ts +1 -1
- package/dist/modules/modals/ShareModal/hooks/useShare.d.ts +1 -1
- package/dist/modules/modals/ShareModal/hooks/useShareBookmark.d.ts +1 -1
- package/dist/modules/modals/ShareModal/hooks/useShareMutation.d.ts +1 -1
- package/dist/modules/modals/ShareModal/hooks/useShareMutation.js +13 -12
- package/dist/modules/modals/ShareModal/hooks/useShareMutation.js.map +1 -0
- package/dist/modules/modals/ShareModal/utils/hasRight.d.ts +1 -1
- package/dist/modules/modals/ShareModal/utils/showShareRightLine.d.ts +1 -1
- package/dist/modules/multimedia/AudioRecorder/AudioRecorder.d.ts +1 -1
- package/dist/modules/multimedia/AudioRecorder/AudioRecorder.js +44 -43
- package/dist/modules/multimedia/AudioRecorder/AudioRecorder.js.map +1 -0
- package/dist/modules/multimedia/AudioRecorder/AudioRecorderTimer.js +19 -18
- package/dist/modules/multimedia/AudioRecorder/AudioRecorderTimer.js.map +1 -0
- package/dist/modules/multimedia/AudioRecorder/useAudioRecorder.d.ts +1 -1
- package/dist/modules/multimedia/AudioRecorder/useAudioRecorder.js +158 -157
- package/dist/modules/multimedia/AudioRecorder/useAudioRecorder.js.map +1 -0
- package/dist/modules/multimedia/Embed/Embed.js +23 -22
- package/dist/modules/multimedia/Embed/Embed.js.map +1 -0
- package/dist/modules/multimedia/ImageEditor/components/ImageEditor.js +80 -79
- package/dist/modules/multimedia/ImageEditor/components/ImageEditor.js.map +1 -0
- package/dist/modules/multimedia/ImageEditor/components/ImageEditorToolbar.js +38 -37
- package/dist/modules/multimedia/ImageEditor/components/ImageEditorToolbar.js.map +1 -0
- package/dist/modules/multimedia/ImageEditor/effects/blur.js +50 -49
- package/dist/modules/multimedia/ImageEditor/effects/blur.js.map +1 -0
- package/dist/modules/multimedia/ImageEditor/effects/crop.js +100 -99
- package/dist/modules/multimedia/ImageEditor/effects/crop.js.map +1 -0
- package/dist/modules/multimedia/ImageEditor/effects/misc.js +108 -107
- package/dist/modules/multimedia/ImageEditor/effects/misc.js.map +1 -0
- package/dist/modules/multimedia/ImageEditor/effects/resize.js +97 -96
- package/dist/modules/multimedia/ImageEditor/effects/resize.js.map +1 -0
- package/dist/modules/multimedia/ImageEditor/effects/rotate.js +26 -25
- package/dist/modules/multimedia/ImageEditor/effects/rotate.js.map +1 -0
- package/dist/modules/multimedia/ImageEditor/hooks/useHistoryTool.js +56 -57
- package/dist/modules/multimedia/ImageEditor/hooks/useHistoryTool.js.map +1 -0
- package/dist/modules/multimedia/ImageEditor/hooks/useImageEditor.js +57 -56
- package/dist/modules/multimedia/ImageEditor/hooks/useImageEditor.js.map +1 -0
- package/dist/modules/multimedia/ImageEditor/hooks/useImageEffects.js +29 -28
- package/dist/modules/multimedia/ImageEditor/hooks/useImageEffects.js.map +1 -0
- package/dist/modules/multimedia/ImageEditor/utils/aggregate.js +10 -9
- package/dist/modules/multimedia/ImageEditor/utils/aggregate.js.map +1 -0
- package/dist/modules/multimedia/ImagePickerWorkspace/ImagePickerWorkspace.d.ts +1 -1
- package/dist/modules/multimedia/ImagePickerWorkspace/ImagePickerWorkspace.js +34 -33
- package/dist/modules/multimedia/ImagePickerWorkspace/ImagePickerWorkspace.js.map +1 -0
- package/dist/modules/multimedia/Linker/ExternalLinker.js +37 -36
- package/dist/modules/multimedia/Linker/ExternalLinker.js.map +1 -0
- package/dist/modules/multimedia/Linker/InternalLinker.d.ts +1 -1
- package/dist/modules/multimedia/Linker/InternalLinker.js +89 -88
- package/dist/modules/multimedia/Linker/InternalLinker.js.map +1 -0
- package/dist/modules/multimedia/LinkerCard/LinkerCard.d.ts +1 -1
- package/dist/modules/multimedia/LinkerCard/LinkerCard.js +32 -31
- package/dist/modules/multimedia/LinkerCard/LinkerCard.js.map +1 -0
- package/dist/modules/multimedia/MediaLibrary/MediaLibrary.d.ts +1 -1
- package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +119 -118
- package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js.map +1 -0
- package/dist/modules/multimedia/MediaLibrary/MediaLibraryContext.d.ts +2 -2
- package/dist/modules/multimedia/MediaLibrary/MediaLibraryContext.js +9 -8
- package/dist/modules/multimedia/MediaLibrary/MediaLibraryContext.js.map +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Audio.js +16 -15
- package/dist/modules/multimedia/MediaLibrary/innertabs/Audio.js.map +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/ExternalLink.js +13 -12
- package/dist/modules/multimedia/MediaLibrary/innertabs/ExternalLink.js.map +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Iframe.js +10 -9
- package/dist/modules/multimedia/MediaLibrary/innertabs/Iframe.js.map +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/InternalLink.d.ts +1 -1
- package/dist/modules/multimedia/MediaLibrary/innertabs/InternalLink.js +29 -28
- package/dist/modules/multimedia/MediaLibrary/innertabs/InternalLink.js.map +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Upload.js +23 -22
- package/dist/modules/multimedia/MediaLibrary/innertabs/Upload.js.map +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Video.js +18 -17
- package/dist/modules/multimedia/MediaLibrary/innertabs/Video.js.map +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/VideoEmbedder.js +10 -9
- package/dist/modules/multimedia/MediaLibrary/innertabs/VideoEmbedder.js.map +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Workspace.js +17 -16
- package/dist/modules/multimedia/MediaLibrary/innertabs/Workspace.js.map +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/index.js +19 -18
- package/dist/modules/multimedia/MediaLibrary/innertabs/index.js.map +1 -0
- package/dist/modules/multimedia/UploadFiles/UploadFiles.d.ts +1 -1
- package/dist/modules/multimedia/UploadFiles/UploadFiles.js +42 -41
- package/dist/modules/multimedia/UploadFiles/UploadFiles.js.map +1 -0
- package/dist/modules/multimedia/VideoEmbed/VideoEmbed.js +60 -59
- package/dist/modules/multimedia/VideoEmbed/VideoEmbed.js.map +1 -0
- package/dist/modules/multimedia/VideoRecorder/VideoRecorder.d.ts +1 -1
- package/dist/modules/multimedia/VideoRecorder/VideoRecorder.js +154 -153
- package/dist/modules/multimedia/VideoRecorder/VideoRecorder.js.map +1 -0
- package/dist/modules/multimedia/Workspace/Workspace.d.ts +1 -1
- package/dist/modules/multimedia/Workspace/Workspace.js +113 -112
- package/dist/modules/multimedia/Workspace/Workspace.js.map +1 -0
- package/dist/multimedia.js +19 -18
- package/dist/multimedia.js.map +1 -0
- package/dist/portal/Header/Badge.js +6 -5
- package/dist/portal/Header/Badge.js.map +1 -0
- package/dist/portal/Header/Header.js +138 -137
- package/dist/portal/Header/Header.js.map +1 -0
- package/dist/portal/Header/NavItem.js +12 -11
- package/dist/portal/Header/NavItem.js.map +1 -0
- package/dist/portal/Header/NavLink.js +15 -14
- package/dist/portal/Header/NavLink.js.map +1 -0
- package/dist/portal/Header/Navbar.js +10 -9
- package/dist/portal/Header/Navbar.js.map +1 -0
- package/dist/portal/Header/NavbarNav.js +10 -9
- package/dist/portal/Header/NavbarNav.js.map +1 -0
- package/dist/portal/Header/WidgetApps.d.ts +1 -1
- package/dist/portal/Header/WidgetApps.js +17 -16
- package/dist/portal/Header/WidgetApps.js.map +1 -0
- package/dist/portal/Help/Help.d.ts +0 -1
- package/dist/portal/Help/Help.js +19 -18
- package/dist/portal/Help/Help.js.map +1 -0
- package/dist/portal/Help/hooks/useHelp.js +64 -63
- package/dist/portal/Help/hooks/useHelp.js.map +1 -0
- package/dist/portal/Layout/Layout.js +36 -35
- package/dist/portal/Layout/Layout.js.map +1 -0
- package/dist/portal/SearchEngine/SearchEngine.js +26 -25
- package/dist/portal/SearchEngine/SearchEngine.js.map +1 -0
- package/dist/utils/MockedDataProvider/MockedDataProvider.d.ts +1 -1
- package/dist/utils/MockedDataProvider/MockedDataProvider.js +22 -21
- package/dist/utils/MockedDataProvider/MockedDataProvider.js.map +1 -0
- package/dist/utils/StringUtils.js +9 -8
- package/dist/utils/StringUtils.js.map +1 -0
- package/dist/utils/addTimestampToUrl.js +5 -4
- package/dist/utils/addTimestampToUrl.js.map +1 -0
- package/dist/utils/blob.js +10 -9
- package/dist/utils/blob.js.map +1 -0
- package/dist/utils/checkUserRight.d.ts +1 -1
- package/dist/utils/checkUserRight.js +28 -27
- package/dist/utils/checkUserRight.js.map +1 -0
- package/dist/utils/fileSize.js +6 -5
- package/dist/utils/fileSize.js.map +1 -0
- package/dist/utils/findTreeNode.js +8 -7
- package/dist/utils/findTreeNode.js.map +1 -0
- package/dist/utils/isActionAvailable.d.ts +1 -1
- package/dist/utils/isActionAvailable.js +5 -4
- package/dist/utils/isActionAvailable.js.map +1 -0
- package/dist/utils/libraryMaps.js +3 -2
- package/dist/utils/libraryMaps.js.map +1 -0
- package/dist/utils/noop.js +3 -2
- package/dist/utils/noop.js.map +1 -0
- package/dist/utils/ref.js +9 -8
- package/dist/utils/ref.js.map +1 -0
- package/dist/utils/thumbnail.js +4 -3
- package/dist/utils/thumbnail.js.map +1 -0
- package/dist/utils/time.js +8 -7
- package/dist/utils/time.js.map +1 -0
- package/dist/utils/treeview.d.ts +1 -1
- package/dist/utils/treeview.js +97 -96
- package/dist/utils/treeview.js.map +1 -0
- package/dist/utils/video.js +3 -2
- package/dist/utils/video.js.map +1 -0
- package/dist/widgets/BookmarkedApps/BookmarkedApps.d.ts +1 -1
- package/dist/widgets/BookmarkedApps/BookmarkedApps.js +7 -6
- package/dist/widgets/BookmarkedApps/BookmarkedApps.js.map +1 -0
- package/dist/widgets/Widget/Widget.js +19 -18
- package/dist/widgets/Widget/Widget.js.map +1 -0
- package/package.json +19 -28
|
@@ -1,33 +1,34 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, useMemo } from "react";
|
|
3
|
-
import { Context } from "./FormContext.js";
|
|
4
|
-
import { FormText } from "./FormText.js";
|
|
5
|
-
import { Label } from "../Label/Label.js";
|
|
6
|
-
import { Input } from "../Input/Input.js";
|
|
7
|
-
const
|
|
8
|
-
children,
|
|
9
|
-
className,
|
|
10
|
-
id,
|
|
11
|
-
isOptional,
|
|
12
|
-
isReadOnly,
|
|
13
|
-
isRequired,
|
|
14
|
-
status,
|
|
15
|
-
...
|
|
16
|
-
},
|
|
17
|
-
const
|
|
18
|
-
id,
|
|
19
|
-
isOptional,
|
|
20
|
-
isRequired,
|
|
21
|
-
isReadOnly,
|
|
22
|
-
status
|
|
23
|
-
}), [
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
}),
|
|
26
|
-
Label,
|
|
27
|
-
Input,
|
|
28
|
-
Text:
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as i, useMemo as l } from "react";
|
|
3
|
+
import { Context as s } from "./FormContext.js";
|
|
4
|
+
import { FormText as u } from "./FormText.js";
|
|
5
|
+
import { Label as v } from "../Label/Label.js";
|
|
6
|
+
import { Input as b } from "../Input/Input.js";
|
|
7
|
+
const d = /* @__PURE__ */ i(({
|
|
8
|
+
children: n,
|
|
9
|
+
className: p,
|
|
10
|
+
id: o,
|
|
11
|
+
isOptional: r,
|
|
12
|
+
isReadOnly: t,
|
|
13
|
+
isRequired: m,
|
|
14
|
+
status: e,
|
|
15
|
+
...c
|
|
16
|
+
}, x) => {
|
|
17
|
+
const a = l(() => ({
|
|
18
|
+
id: o,
|
|
19
|
+
isOptional: r,
|
|
20
|
+
isRequired: m,
|
|
21
|
+
isReadOnly: t,
|
|
22
|
+
status: e
|
|
23
|
+
}), [o, r, t, m, e]);
|
|
24
|
+
return /* @__PURE__ */ f(s.Provider, { value: a, children: /* @__PURE__ */ f("div", { ref: x, className: p, ...c, children: n }) });
|
|
25
|
+
}), w = /* @__PURE__ */ Object.assign(d, {
|
|
26
|
+
Label: v,
|
|
27
|
+
Input: b,
|
|
28
|
+
Text: u
|
|
29
29
|
});
|
|
30
30
|
export {
|
|
31
|
-
FormControl,
|
|
32
|
-
|
|
31
|
+
w as FormControl,
|
|
32
|
+
w as default
|
|
33
33
|
};
|
|
34
|
+
//# sourceMappingURL=FormControl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormControl.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { useFormControl } from "./FormContext.js";
|
|
4
|
-
const
|
|
5
|
-
children
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import i from "clsx";
|
|
3
|
+
import { useFormControl as m } from "./FormContext.js";
|
|
4
|
+
const n = ({
|
|
5
|
+
children: t
|
|
6
6
|
}) => {
|
|
7
7
|
const {
|
|
8
|
-
status
|
|
9
|
-
} =
|
|
10
|
-
"is-invalid":
|
|
11
|
-
valid:
|
|
8
|
+
status: o
|
|
9
|
+
} = m(), r = i("form-text", {
|
|
10
|
+
"is-invalid": o === "invalid",
|
|
11
|
+
valid: o === "valid"
|
|
12
12
|
});
|
|
13
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ s("p", { className: r, children: /* @__PURE__ */ s("em", { children: t }) });
|
|
14
14
|
};
|
|
15
15
|
export {
|
|
16
|
-
FormText,
|
|
17
|
-
|
|
16
|
+
n as FormText,
|
|
17
|
+
n as default
|
|
18
18
|
};
|
|
19
|
+
//# sourceMappingURL=FormText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormText.js","sources":["../../../src/components/Form/FormText.tsx"],"sourcesContent":["import { ReactNode } from 'react';\n\nimport clsx from 'clsx';\n\nimport { useFormControl } from './FormContext';\n\nexport const FormText = ({ children }: { children: ReactNode }) => {\n const { status } = useFormControl();\n const classes = clsx('form-text', {\n 'is-invalid': status === 'invalid',\n valid: status === 'valid',\n });\n\n return (\n <p className={classes}>\n <em>{children}</em>\n </p>\n );\n};\n\nFormText.displayName = 'Text';\n\nexport default FormText;\n"],"names":["FormText","children","status","useFormControl","classes","clsx","valid","jsx"],"mappings":";;;AAMO,MAAMA,IAAWA,CAAC;AAAA,EAAEC,UAAAA;AAAkC,MAAM;AAC3D,QAAA;AAAA,IAAEC,QAAAA;AAAAA,MAAWC,EAAe,GAC5BC,IAAUC,EAAK,aAAa;AAAA,IAChC,cAAcH,MAAW;AAAA,IACzBI,OAAOJ,MAAW;AAAA,EAAA,CACnB;AAED,2BACG,KAAE,EAAA,WAAWE,GACZ,UAAC,gBAAAG,EAAA,MAAA,EAAIN,UAAAA,EAAS,CAAA,EAChB,CAAA;AAEJ;"}
|
|
@@ -1,32 +1,33 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
const
|
|
4
|
-
children,
|
|
5
|
-
className,
|
|
6
|
-
...
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import n from "clsx";
|
|
3
|
+
const p = ({
|
|
4
|
+
children: r,
|
|
5
|
+
className: o,
|
|
6
|
+
...s
|
|
7
7
|
}) => {
|
|
8
|
-
const
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
-
},
|
|
11
|
-
sm,
|
|
12
|
-
md,
|
|
13
|
-
lg,
|
|
14
|
-
xl,
|
|
15
|
-
children,
|
|
16
|
-
className,
|
|
17
|
-
as,
|
|
18
|
-
...
|
|
8
|
+
const c = n("grid", o);
|
|
9
|
+
return /* @__PURE__ */ t("div", { className: c, ...s, children: r });
|
|
10
|
+
}, $ = ({
|
|
11
|
+
sm: r,
|
|
12
|
+
md: o,
|
|
13
|
+
lg: s,
|
|
14
|
+
xl: c,
|
|
15
|
+
children: l,
|
|
16
|
+
className: e,
|
|
17
|
+
as: a,
|
|
18
|
+
...i
|
|
19
19
|
}) => {
|
|
20
|
-
const
|
|
21
|
-
[`g-col-${
|
|
22
|
-
[
|
|
23
|
-
[
|
|
24
|
-
[
|
|
25
|
-
},
|
|
26
|
-
return /* @__PURE__ */
|
|
20
|
+
const m = a || "div", g = n({
|
|
21
|
+
[`g-col-${r}`]: r,
|
|
22
|
+
[o ? `g-col-md-${o}` : ""]: o,
|
|
23
|
+
[s ? `g-col-lg-${s}` : ""]: s,
|
|
24
|
+
[c ? `g-col-xl-${c}` : ""]: c
|
|
25
|
+
}, e);
|
|
26
|
+
return /* @__PURE__ */ t(m, { className: g, ...i, children: l });
|
|
27
27
|
};
|
|
28
|
-
|
|
28
|
+
p.Col = $;
|
|
29
29
|
export {
|
|
30
|
-
Column,
|
|
31
|
-
Grid
|
|
30
|
+
$ as Column,
|
|
31
|
+
p as Grid
|
|
32
32
|
};
|
|
33
|
+
//# sourceMappingURL=Grid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Grid.js","sources":["../../../src/components/Grid/Grid.tsx"],"sourcesContent":["import { ReactNode } from 'react';\n\nimport clsx from 'clsx';\n\nexport interface GridProps {\n /**\n * Content inside the Grid component. Usually GridCol components\n */\n children: ReactNode;\n /**\n * Optional class for styling purpose\n */\n className?: string;\n}\n\nexport interface GridColProps extends React.ComponentPropsWithoutRef<'div'> {\n /**\n * Size on Mobile\n */\n sm: string;\n /**\n * Size on Tablet\n */\n md?: string;\n /**\n * Size on Small Desktop\n */\n lg?: string;\n /**\n * Size on Large Desktop\n */\n xl?: string;\n /**\n * Accept content as children\n */\n children: ReactNode;\n /**\n * Optional class for styling purpose\n */\n className?: string;\n /**\n * As Prop\n */\n as?: React.ElementType;\n}\n\n/**\n * Grid of 12 columns on Desktop, 8 on Tablet and 4 on Mobile\n */\n\nexport const Grid = ({ children, className, ...restProps }: GridProps) => {\n const classes = clsx('grid', className);\n return (\n <div className={classes} {...restProps}>\n {children}\n </div>\n );\n};\n\nexport const Column = ({\n sm,\n md,\n lg,\n xl,\n children,\n className,\n as,\n ...restProps\n}: GridColProps) => {\n const Component = as || 'div';\n const classes = clsx(\n {\n [`g-col-${sm}`]: sm,\n [md ? `g-col-md-${md}` : '']: md,\n [lg ? `g-col-lg-${lg}` : '']: lg,\n [xl ? `g-col-xl-${xl}` : '']: xl,\n },\n className,\n );\n return (\n <Component className={classes} {...restProps}>\n {children}\n </Component>\n );\n};\n\nGrid.displayName = 'Grid';\nColumn.displayName = 'Grid.Col';\n\nGrid.Col = Column;\n"],"names":["Grid","children","className","restProps","classes","clsx","Column","sm","md","lg","xl","as","Component","Col"],"mappings":";;AAkDO,MAAMA,IAAOA,CAAC;AAAA,EAAEC,UAAAA;AAAAA,EAAUC,WAAAA;AAAAA,EAAW,GAAGC;AAAqB,MAAM;AAClEC,QAAAA,IAAUC,EAAK,QAAQH,CAAS;AACtC,2BACG,OAAI,EAAA,WAAWE,GAAaD,GAAAA,GAC1BF,UAAAA,EACH,CAAA;AAEJ,GAEaK,IAASA,CAAC;AAAA,EACrBC,IAAAA;AAAAA,EACAC,IAAAA;AAAAA,EACAC,IAAAA;AAAAA,EACAC,IAAAA;AAAAA,EACAT,UAAAA;AAAAA,EACAC,WAAAA;AAAAA,EACAS,IAAAA;AAAAA,EACA,GAAGR;AACS,MAAM;AAClB,QAAMS,IAAYD,KAAM,OAClBP,IAAUC,EACd;AAAA,IACE,CAAC,SAASE,CAAE,EAAE,GAAGA;AAAAA,IACjB,CAACC,IAAK,YAAYA,CAAE,KAAK,EAAE,GAAGA;AAAAA,IAC9B,CAACC,IAAK,YAAYA,CAAE,KAAK,EAAE,GAAGA;AAAAA,IAC9B,CAACC,IAAK,YAAYA,CAAE,KAAK,EAAE,GAAGA;AAAAA,KAEhCR,CACF;AACA,2BACGU,GAAU,EAAA,WAAWR,GAAaD,GAAAA,GAChCF,UAAAA,EACH,CAAA;AAEJ;AAKAD,EAAKa,MAAMP;"}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
level:
|
|
6
|
-
headingStyle = "h1",
|
|
7
|
-
children,
|
|
8
|
-
className,
|
|
9
|
-
...
|
|
10
|
-
},
|
|
11
|
-
const
|
|
12
|
-
return /* @__PURE__ */
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as l } from "react";
|
|
3
|
+
import c from "clsx";
|
|
4
|
+
const d = /* @__PURE__ */ l(({
|
|
5
|
+
level: r = "h1",
|
|
6
|
+
headingStyle: o = "h1",
|
|
7
|
+
children: s,
|
|
8
|
+
className: e,
|
|
9
|
+
...t
|
|
10
|
+
}, a) => {
|
|
11
|
+
const m = c(o, e);
|
|
12
|
+
return /* @__PURE__ */ f(r, { ref: a, className: m, ...t, children: s });
|
|
13
13
|
});
|
|
14
14
|
export {
|
|
15
|
-
Heading,
|
|
16
|
-
|
|
15
|
+
d as Heading,
|
|
16
|
+
d as default
|
|
17
17
|
};
|
|
18
|
+
//# sourceMappingURL=Heading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Heading.js","sources":["../../../src/components/Heading/Heading.tsx"],"sourcesContent":["import { ReactNode, forwardRef } from 'react';\n\nimport clsx from 'clsx';\n\nexport type HeadingElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n\nexport interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {\n /**\n * Level of Heading\n * `\"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\"`\n */\n level?: HeadingElement;\n /**\n * Apply Bootstrap utility Class\n * `\"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\"`\n */\n headingStyle?: HeadingElement;\n /**\n * Text to render\n */\n children: ReactNode;\n /**\n * Optional class for styling purpose\n */\n className?: string;\n}\n\n/**\n * Heading component to display heading elements\n */\nexport const Heading = forwardRef<HTMLHeadingElement, HeadingProps>(\n (\n {\n level: Component = 'h1',\n headingStyle = 'h1',\n children,\n className,\n ...restProps\n }: HeadingProps,\n ref,\n ) => {\n const classes = clsx(headingStyle, className);\n return (\n <Component ref={ref} className={classes} {...restProps}>\n {children}\n </Component>\n );\n },\n);\n\nHeading.displayName = 'Heading';\n\nexport default Heading;\n"],"names":["Heading","level","Component","headingStyle","children","className","restProps","ref","classes","clsx"],"mappings":";;;AA8BaA,MAAAA,sBACX,CACE;AAAA,EACEC,OAAOC,IAAY;AAAA,EACnBC,cAAAA,IAAe;AAAA,EACfC,UAAAA;AAAAA,EACAC,WAAAA;AAAAA,EACA,GAAGC;AACS,GACdC,MACG;AACGC,QAAAA,IAAUC,EAAKN,GAAcE,CAAS;AAC5C,2BACGH,GAAU,EAAA,KAAAK,GAAU,WAAWC,GAAS,GAAIF,GAC1CF,UAAAA,EACH,CAAA;AAEJ,CACF;"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
const
|
|
4
|
-
name,
|
|
5
|
-
size = "24",
|
|
6
|
-
...
|
|
7
|
-
}) => /* @__PURE__ */
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import h from "@edifice.io/icons/icons.svg";
|
|
3
|
+
const m = ({
|
|
4
|
+
name: e,
|
|
5
|
+
size: r = "24",
|
|
6
|
+
...o
|
|
7
|
+
}) => /* @__PURE__ */ t("svg", { ...o, width: r, height: r, children: /* @__PURE__ */ t("use", { href: `${h}#${e}` }) });
|
|
8
8
|
export {
|
|
9
|
-
Icon
|
|
9
|
+
m as Icon
|
|
10
10
|
};
|
|
11
|
+
//# sourceMappingURL=Icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Icon.js","sources":["../../../src/components/Icon/Icon.tsx"],"sourcesContent":["import type { IconName } from '@edifice.io/icons';\nimport spriteHref from '@edifice.io/icons/icons.svg';\nimport type { SVGProps } from 'react';\n\n/**\n * IconSize (default to 24x24)\n */\ntype IconSize =\n | '16'\n | '18'\n | '20'\n | '22'\n | '24'\n | '40'\n | '36'\n | '48'\n | (string & {});\n\n/**\n * Icon component displays any icon from `@edifice.io/icons`\n */\nexport const Icon = ({\n name,\n size = '24',\n ...props\n}: SVGProps<SVGSVGElement> & {\n name: IconName;\n size?: IconSize;\n}) => {\n return (\n <svg {...props} width={size} height={size}>\n <use href={`${spriteHref}#${name}`} />\n </svg>\n );\n};\n\nIcon.displayName = 'Icon';\n"],"names":["Icon","name","size","props","jsx","spriteHref"],"mappings":";;AAqBO,MAAMA,IAAOA,CAAC;AAAA,EACnBC,MAAAA;AAAAA,EACAC,MAAAA,IAAO;AAAA,EACP,GAAGC;AAIL,wBAEK,OAAQA,EAAAA,GAAAA,GAAO,OAAOD,GAAM,QAAQA,GACnC,UAAC,gBAAAE,EAAA,OAAA,EAAI,MAAM,GAAGC,CAAU,IAAIJ,CAAI,IAAG,EACrC,CAAA;"}
|
|
@@ -1,42 +1,43 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
src,
|
|
8
|
-
alt,
|
|
9
|
-
imgPlaceholder,
|
|
10
|
-
ratio,
|
|
11
|
-
objectFit,
|
|
12
|
-
className,
|
|
13
|
-
...
|
|
14
|
-
},
|
|
15
|
-
const [
|
|
16
|
-
imgSrc,
|
|
17
|
-
onError
|
|
18
|
-
} =
|
|
19
|
-
src,
|
|
20
|
-
placeholder
|
|
21
|
-
}),
|
|
22
|
-
"ratio ratio-1x1":
|
|
23
|
-
"ratio ratio-4x3":
|
|
24
|
-
"ratio ratio-16x9":
|
|
25
|
-
"ratio ratio-21x9":
|
|
26
|
-
},
|
|
27
|
-
"object-fit-contain":
|
|
28
|
-
"object-fit-cover":
|
|
29
|
-
"object-fit-fill":
|
|
30
|
-
"object-fit-scale":
|
|
31
|
-
"object-fit-none":
|
|
32
|
-
},
|
|
33
|
-
...
|
|
34
|
-
}),
|
|
35
|
-
...
|
|
36
|
-
},
|
|
37
|
-
return
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as j } from "react";
|
|
3
|
+
import a from "clsx";
|
|
4
|
+
import v from "../../core/usePaths/usePaths.js";
|
|
5
|
+
import b from "../../hooks/useImage/useImage.js";
|
|
6
|
+
const R = /* @__PURE__ */ j(({
|
|
7
|
+
src: s,
|
|
8
|
+
alt: c,
|
|
9
|
+
imgPlaceholder: n,
|
|
10
|
+
ratio: o,
|
|
11
|
+
objectFit: r,
|
|
12
|
+
className: i,
|
|
13
|
+
...m
|
|
14
|
+
}, l) => {
|
|
15
|
+
const [f] = v(), g = n ?? `${f}/common/image-placeholder.png`, {
|
|
16
|
+
imgSrc: p,
|
|
17
|
+
onError: d
|
|
18
|
+
} = b({
|
|
19
|
+
src: s,
|
|
20
|
+
placeholder: g
|
|
21
|
+
}), x = {
|
|
22
|
+
"ratio ratio-1x1": o === "1",
|
|
23
|
+
"ratio ratio-4x3": o === "4",
|
|
24
|
+
"ratio ratio-16x9": o === "16",
|
|
25
|
+
"ratio ratio-21x9": o === "21"
|
|
26
|
+
}, h = {
|
|
27
|
+
"object-fit-contain": r === "contain",
|
|
28
|
+
"object-fit-cover": r === "cover",
|
|
29
|
+
"object-fit-fill": r === "fill",
|
|
30
|
+
"object-fit-scale": r === "scale",
|
|
31
|
+
"object-fit-none": r === "none"
|
|
32
|
+
}, u = a({
|
|
33
|
+
...x
|
|
34
|
+
}), I = a({
|
|
35
|
+
...h
|
|
36
|
+
}, i), e = /* @__PURE__ */ t("img", { alt: c, onError: d, ref: l, src: p, className: I, ...m });
|
|
37
|
+
return o ? /* @__PURE__ */ t("div", { className: u, children: e }) : e;
|
|
38
38
|
});
|
|
39
39
|
export {
|
|
40
|
-
Image,
|
|
41
|
-
|
|
40
|
+
R as Image,
|
|
41
|
+
R as default
|
|
42
42
|
};
|
|
43
|
+
//# sourceMappingURL=Image.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Image.js","sources":["../../../src/components/Image/Image.tsx"],"sourcesContent":["import { forwardRef, Ref } from 'react';\n\nimport clsx from 'clsx';\n\nimport usePaths from '../../core/usePaths/usePaths';\nimport useImage from '../../hooks/useImage/useImage';\n\nexport interface ImageProps extends React.ComponentPropsWithRef<'img'> {\n /**\n * Image URL\n */\n src: string;\n /**\n * Alternative text for a11y\n */\n alt: string;\n /**\n * Image ratio\n */\n ratio?: '1' | '4' | '16' | '21';\n /**\n * Object fit property\n */\n objectFit?: 'contain' | 'cover' | 'fill' | 'scale' | 'none';\n /**\n * Placeholder image as fallback\n */\n imgPlaceholder?: string;\n /**\n * Optional class for styling purpose\n */\n className?: string;\n}\n\nexport const Image = forwardRef(\n (\n {\n src,\n alt,\n imgPlaceholder,\n ratio,\n objectFit,\n className,\n ...restProps\n }: ImageProps,\n ref: Ref<HTMLImageElement>,\n ) => {\n const [imagePath] = usePaths();\n const placeholder =\n imgPlaceholder ?? `${imagePath}/common/image-placeholder.png`;\n\n const { imgSrc, onError } = useImage({ src, placeholder });\n\n const ratioImage = {\n 'ratio ratio-1x1': ratio === '1',\n 'ratio ratio-4x3': ratio === '4',\n 'ratio ratio-16x9': ratio === '16',\n 'ratio ratio-21x9': ratio === '21',\n };\n\n const objectImage = {\n 'object-fit-contain': objectFit === 'contain',\n 'object-fit-cover': objectFit === 'cover',\n 'object-fit-fill': objectFit === 'fill',\n 'object-fit-scale': objectFit === 'scale',\n 'object-fit-none': objectFit === 'none',\n };\n\n const ratioClasses = clsx({\n ...ratioImage,\n });\n\n const classes = clsx(\n {\n ...objectImage,\n },\n className,\n );\n\n const renderImage = (\n <img\n alt={alt}\n onError={onError}\n ref={ref}\n src={imgSrc}\n className={classes}\n {...restProps}\n />\n );\n\n if (ratio) {\n return <div className={ratioClasses}>{renderImage}</div>;\n }\n\n return renderImage;\n },\n);\n\nImage.displayName = 'Image';\n\nexport default Image;\n"],"names":["Image","src","alt","imgPlaceholder","ratio","objectFit","className","restProps","ref","imagePath","usePaths","placeholder","imgSrc","onError","useImage","ratioImage","objectImage","ratioClasses","clsx","classes","renderImage","jsx"],"mappings":";;;;;AAkCaA,MAAAA,sBACX,CACE;AAAA,EACEC,KAAAA;AAAAA,EACAC,KAAAA;AAAAA,EACAC,gBAAAA;AAAAA,EACAC,OAAAA;AAAAA,EACAC,WAAAA;AAAAA,EACAC,WAAAA;AAAAA,EACA,GAAGC;AACO,GACZC,MACG;AACG,QAAA,CAACC,CAAS,IAAIC,KACdC,IACJR,KAAkB,GAAGM,CAAS,iCAE1B;AAAA,IAAEG,QAAAA;AAAAA,IAAQC,SAAAA;AAAAA,MAAYC,EAAS;AAAA,IAAEb,KAAAA;AAAAA,IAAKU,aAAAA;AAAAA,EAAAA,CAAa,GAEnDI,IAAa;AAAA,IACjB,mBAAmBX,MAAU;AAAA,IAC7B,mBAAmBA,MAAU;AAAA,IAC7B,oBAAoBA,MAAU;AAAA,IAC9B,oBAAoBA,MAAU;AAAA,EAAA,GAG1BY,IAAc;AAAA,IAClB,sBAAsBX,MAAc;AAAA,IACpC,oBAAoBA,MAAc;AAAA,IAClC,mBAAmBA,MAAc;AAAA,IACjC,oBAAoBA,MAAc;AAAA,IAClC,mBAAmBA,MAAc;AAAA,EAAA,GAG7BY,IAAeC,EAAK;AAAA,IACxB,GAAGH;AAAAA,EAAAA,CACJ,GAEKI,IAAUD,EACd;AAAA,IACE,GAAGF;AAAAA,KAELV,CACF,GAEMc,IACH,gBAAAC,EAAA,OAAA,EACC,KAAAnB,GACA,SAAAW,GACA,KAAAL,GACA,KAAKI,GACL,WAAWO,GACPZ,GAAAA,EAEP,CAAA;AAED,SAAIH,IACM,gBAAAiB,EAAA,OAAA,EAAI,WAAWJ,GAAeG,UAAYA,EAAA,CAAA,IAG7CA;AACT,CACF;"}
|
|
@@ -1,58 +1,59 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, useState, useEffect } from "react";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { FormControl } from "../Form/FormControl.js";
|
|
6
|
-
import { IconButton } from "../Button/IconButton.js";
|
|
7
|
-
import { Icon } from "../Icon/Icon.js";
|
|
8
|
-
import { Input } from "../Input/Input.js";
|
|
9
|
-
import { Avatar } from "../Avatar/Avatar.js";
|
|
10
|
-
import { AppIcon } from "../AppIcon/AppIcon.js";
|
|
11
|
-
const
|
|
12
|
-
label,
|
|
13
|
-
addButtonLabel = "Add image",
|
|
14
|
-
deleteButtonLabel = "Delete image",
|
|
15
|
-
src,
|
|
16
|
-
className,
|
|
17
|
-
app,
|
|
18
|
-
onUploadImage,
|
|
19
|
-
onDeleteImage
|
|
20
|
-
},
|
|
21
|
-
const [
|
|
22
|
-
inputRef,
|
|
23
|
-
files,
|
|
24
|
-
deleteFile,
|
|
25
|
-
handleOnChange,
|
|
26
|
-
handleDragging,
|
|
27
|
-
handleDragLeave,
|
|
28
|
-
handleDrop
|
|
29
|
-
} =
|
|
30
|
-
|
|
31
|
-
if (
|
|
32
|
-
|
|
33
|
-
const
|
|
34
|
-
if (!
|
|
35
|
-
|
|
1
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as j, useState as R, useEffect as w } from "react";
|
|
3
|
+
import A from "clsx";
|
|
4
|
+
import F from "../../hooks/useDropzone/useDropzone.js";
|
|
5
|
+
import { FormControl as m } from "../Form/FormControl.js";
|
|
6
|
+
import { IconButton as s } from "../Button/IconButton.js";
|
|
7
|
+
import { Icon as p } from "../Icon/Icon.js";
|
|
8
|
+
import { Input as N } from "../Input/Input.js";
|
|
9
|
+
import { Avatar as O } from "../Avatar/Avatar.js";
|
|
10
|
+
import { AppIcon as E } from "../AppIcon/AppIcon.js";
|
|
11
|
+
const Q = /* @__PURE__ */ j(({
|
|
12
|
+
label: d,
|
|
13
|
+
addButtonLabel: g = "Add image",
|
|
14
|
+
deleteButtonLabel: f = "Delete image",
|
|
15
|
+
src: u,
|
|
16
|
+
className: h,
|
|
17
|
+
app: v,
|
|
18
|
+
onUploadImage: D,
|
|
19
|
+
onDeleteImage: b
|
|
20
|
+
}, C) => {
|
|
21
|
+
const [a, i] = R(u || ""), {
|
|
22
|
+
inputRef: t,
|
|
23
|
+
files: r,
|
|
24
|
+
deleteFile: c,
|
|
25
|
+
handleOnChange: k,
|
|
26
|
+
handleDragging: l,
|
|
27
|
+
handleDragLeave: x,
|
|
28
|
+
handleDrop: y
|
|
29
|
+
} = F();
|
|
30
|
+
w(() => {
|
|
31
|
+
if (r.length > 0) {
|
|
32
|
+
c(r[0]), i("");
|
|
33
|
+
const n = r == null ? void 0 : r[0];
|
|
34
|
+
if (!n) return;
|
|
35
|
+
i(URL.createObjectURL(n)), D(n);
|
|
36
36
|
}
|
|
37
|
-
}, [
|
|
38
|
-
const
|
|
39
|
-
var
|
|
40
|
-
(
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
return /* @__PURE__ */
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */
|
|
37
|
+
}, [r]);
|
|
38
|
+
const z = () => {
|
|
39
|
+
var n;
|
|
40
|
+
(n = t.current) == null || n.click();
|
|
41
|
+
}, I = () => {
|
|
42
|
+
t.current && (t.current.value = ""), c(r[0]), i(""), b();
|
|
43
|
+
}, L = A("image-input", h);
|
|
44
|
+
return /* @__PURE__ */ o(m, { id: "image-input", className: L, onDragEnter: l, onDragOver: l, onDragLeave: x, onDrop: y, ref: C, children: [
|
|
45
|
+
/* @__PURE__ */ o("div", { className: "image-input-actions gap-8", children: [
|
|
46
|
+
/* @__PURE__ */ e(s, { "aria-label": g, color: "tertiary", icon: /* @__PURE__ */ e(p, { name: "edit" }), onClick: z, type: "button", variant: "ghost" }),
|
|
47
|
+
/* @__PURE__ */ e(s, { "aria-label": f, color: "danger", disabled: !a, icon: /* @__PURE__ */ e(p, { name: "delete", size: "20" }), onClick: I, type: "button", variant: "ghost" })
|
|
48
48
|
] }),
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
|
|
49
|
+
/* @__PURE__ */ o(m.Label, { children: [
|
|
50
|
+
/* @__PURE__ */ e("span", { className: "visually-hidden", children: d }),
|
|
51
|
+
/* @__PURE__ */ e(N, { accept: "image/jpeg, image/png", hidden: !0, onChange: k, ref: t, size: "sm", type: "file" }),
|
|
52
|
+
a ? /* @__PURE__ */ e(O, { alt: "", src: a, size: "xl" }) : /* @__PURE__ */ e(E, { app: v, iconFit: "ratio", size: "160", variant: "rounded" })
|
|
53
53
|
] })
|
|
54
54
|
] });
|
|
55
55
|
});
|
|
56
56
|
export {
|
|
57
|
-
ImagePicker
|
|
57
|
+
Q as ImagePicker
|
|
58
58
|
};
|
|
59
|
+
//# sourceMappingURL=ImagePicker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImagePicker.js","sources":["../../../src/components/ImagePicker/ImagePicker.tsx"],"sourcesContent":["import {\n ComponentPropsWithRef,\n forwardRef,\n Ref,\n useEffect,\n useState,\n} from 'react';\n\nimport { IWebApp } from '@edifice.io/ts-client';\nimport clsx from 'clsx';\n\nimport { Icon } from '..';\nimport { useDropzone } from '../../hooks';\nimport { AppIcon } from '../AppIcon';\nimport { Avatar } from '../Avatar';\nimport { IconButton } from '../Button';\nimport { FormControl } from '../Form';\nimport { Input } from '../Input';\n\nexport interface ImagePickerProps extends ComponentPropsWithRef<'input'> {\n /**\n * Description of the ImagePicker label.\n */\n label: string;\n /**\n * Accessible description of the add button\n */\n addButtonLabel: string;\n /**\n * Accessible description of the delete button\n */\n deleteButtonLabel: string;\n /**\n * Provide a default image as placeholder\n */\n src?: string;\n /**\n * To show the icon of an application\n */\n app?: IWebApp | undefined;\n\n appCode?: string;\n /**\n * Optional class for styling purpose\n */\n className?: string;\n /**\n * Callback when uploading image\n */\n onUploadImage: (file: File) => void;\n /**\n * Callback when deleting image\n */\n onDeleteImage: () => void;\n}\n\nexport const ImagePicker = forwardRef(\n (\n {\n label,\n addButtonLabel = 'Add image',\n deleteButtonLabel = 'Delete image',\n src,\n className,\n app,\n onUploadImage,\n onDeleteImage,\n }: ImagePickerProps,\n ref: Ref<HTMLInputElement>,\n ) => {\n const [preview, setPreview] = useState<string>(src || '');\n\n const {\n inputRef,\n files,\n deleteFile,\n handleOnChange,\n handleDragging,\n handleDragLeave,\n handleDrop,\n } = useDropzone();\n\n useEffect(() => {\n if (files.length > 0) {\n deleteFile(files[0]);\n setPreview('');\n\n const file = files?.[0];\n if (!file) return;\n\n setPreview(URL.createObjectURL(file));\n onUploadImage(file);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [files]);\n\n const handleClick = () => {\n inputRef.current?.click();\n };\n\n const handleClean = () => {\n if (inputRef.current) {\n inputRef.current.value = '';\n }\n\n deleteFile(files[0]);\n setPreview('');\n onDeleteImage();\n };\n\n const classes = clsx('image-input', className);\n\n return (\n <FormControl\n id=\"image-input\"\n className={classes}\n onDragEnter={handleDragging}\n onDragOver={handleDragging}\n onDragLeave={handleDragLeave}\n onDrop={handleDrop}\n ref={ref}\n >\n <div className=\"image-input-actions gap-8\">\n <IconButton\n aria-label={addButtonLabel}\n color=\"tertiary\"\n icon={<Icon name=\"edit\" />}\n onClick={handleClick}\n type=\"button\"\n variant=\"ghost\"\n />\n <IconButton\n aria-label={deleteButtonLabel}\n color=\"danger\"\n disabled={!preview}\n icon={<Icon name=\"delete\" size=\"20\" />}\n onClick={handleClean}\n type=\"button\"\n variant=\"ghost\"\n />\n </div>\n <FormControl.Label>\n <span className=\"visually-hidden\">{label}</span>\n <Input\n accept=\"image/jpeg, image/png\"\n hidden\n onChange={handleOnChange}\n ref={inputRef}\n size=\"sm\"\n type=\"file\"\n />\n {preview ? (\n <Avatar alt=\"\" src={preview} size=\"xl\" />\n ) : (\n <AppIcon app={app} iconFit=\"ratio\" size=\"160\" variant=\"rounded\" />\n )}\n </FormControl.Label>\n </FormControl>\n );\n },\n);\n\nImagePicker.displayName = 'ImagePicker';\n"],"names":["ImagePicker","label","addButtonLabel","deleteButtonLabel","src","className","app","onUploadImage","onDeleteImage","ref","preview","setPreview","useState","inputRef","files","deleteFile","handleOnChange","handleDragging","handleDragLeave","handleDrop","useDropzone","useEffect","length","file","URL","createObjectURL","handleClick","current","click","handleClean","value","classes","clsx","jsxs","FormControl","jsx","IconButton","Icon","Input","Avatar","AppIcon"],"mappings":";;;;;;;;;;AAwDaA,MAAAA,sBACX,CACE;AAAA,EACEC,OAAAA;AAAAA,EACAC,gBAAAA,IAAiB;AAAA,EACjBC,mBAAAA,IAAoB;AAAA,EACpBC,KAAAA;AAAAA,EACAC,WAAAA;AAAAA,EACAC,KAAAA;AAAAA,EACAC,eAAAA;AAAAA,EACAC,eAAAA;AACgB,GAClBC,MACG;AACH,QAAM,CAACC,GAASC,CAAU,IAAIC,EAAiBR,KAAO,EAAE,GAElD;AAAA,IACJS,UAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,YAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,YAAAA;AAAAA,MACEC,EAAY;AAEhBC,EAAAA,EAAU,MAAM;AACVP,QAAAA,EAAMQ,SAAS,GAAG;AACTR,MAAAA,EAAAA,EAAM,CAAC,CAAC,GACnBH,EAAW,EAAE;AAEPY,YAAAA,IAAOT,KAAAA,gBAAAA,EAAQ;AACrB,UAAI,CAACS,EAAM;AAEAC,MAAAA,EAAAA,IAAIC,gBAAgBF,CAAI,CAAC,GACpChB,EAAcgB,CAAI;AAAA,IACpB;AAAA,EAAA,GAEC,CAACT,CAAK,CAAC;AAEV,QAAMY,IAAcA,MAAM;;AACxBb,KAAAA,IAAAA,EAASc,YAATd,QAAAA,EAAkBe;AAAAA,EAAM,GAGpBC,IAAcA,MAAM;AACxB,IAAIhB,EAASc,YACXd,EAASc,QAAQG,QAAQ,KAGhBhB,EAAAA,EAAM,CAAC,CAAC,GACnBH,EAAW,EAAE,GACCH;EAAA,GAGVuB,IAAUC,EAAK,eAAe3B,CAAS;AAE7C,SACG,gBAAA4B,EAAAC,GAAA,EACC,IAAG,eACH,WAAWH,GACX,aAAad,GACb,YAAYA,GACZ,aAAaC,GACb,QAAQC,GACR,KAAAV,GAEA,UAAA;AAAA,IAAC,gBAAAwB,EAAA,OAAA,EAAI,WAAU,6BACb,UAAA;AAAA,MAAA,gBAAAE,EAACC,KACC,cAAYlC,GACZ,OAAM,YACN,MAAO,gBAAAiC,EAAAE,GAAA,EAAK,MAAK,OAAA,CAAM,GACvB,SAASX,GACT,MAAK,UACL,SAAQ,SAAO;AAAA,MAEjB,gBAAAS,EAACC,KACC,cAAYjC,GACZ,OAAM,UACN,UAAU,CAACO,GACX,MAAM,gBAAAyB,EAACE,KAAK,MAAK,UAAS,MAAK,KAAO,CAAA,GACtC,SAASR,GACT,MAAK,UACL,SAAQ,QAAO,CAAA;AAAA,IAAA,GAEnB;AAAA,IACA,gBAAAI,EAACC,EAAY,OAAZ,EACC,UAAA;AAAA,MAAC,gBAAAC,EAAA,QAAA,EAAK,WAAU,mBAAmBlC,UAAMA,GAAA;AAAA,MACxC,gBAAAkC,EAAAG,GAAA,EACC,QAAO,yBACP,QAAM,IACN,UAAUtB,GACV,KAAKH,GACL,MAAK,MACL,MAAK,QAAM;AAAA,MAEZH,IACE,gBAAAyB,EAAAI,GAAA,EAAO,KAAI,IAAG,KAAK7B,GAAS,MAAK,KAAI,CAAA,IAEtC,gBAAAyB,EAACK,KAAQ,KAAAlC,GAAU,SAAQ,SAAQ,MAAK,OAAM,SAAQ,WACvD;AAAA,IAAA,GACH;AAAA,EACF,EAAA,CAAA;AAEJ,CACF;"}
|
|
@@ -1,32 +1,33 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
|
-
import
|
|
4
|
-
import { useFormControl } from "../Form/FormContext.js";
|
|
5
|
-
const
|
|
6
|
-
noValidationIcon,
|
|
7
|
-
placeholder,
|
|
8
|
-
size = "md",
|
|
9
|
-
type = "text",
|
|
10
|
-
className,
|
|
11
|
-
...
|
|
12
|
-
},
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as p } from "react";
|
|
3
|
+
import u from "clsx";
|
|
4
|
+
import { useFormControl as v } from "../Form/FormContext.js";
|
|
5
|
+
const y = /* @__PURE__ */ p(({
|
|
6
|
+
noValidationIcon: i,
|
|
7
|
+
placeholder: l,
|
|
8
|
+
size: r = "md",
|
|
9
|
+
type: n = "text",
|
|
10
|
+
className: s,
|
|
11
|
+
...m
|
|
12
|
+
}, a) => {
|
|
13
13
|
const {
|
|
14
|
-
id,
|
|
15
|
-
isRequired,
|
|
16
|
-
isReadOnly,
|
|
17
|
-
status
|
|
18
|
-
} =
|
|
19
|
-
"form-control": !
|
|
20
|
-
"form-control-lg":
|
|
21
|
-
"form-control-sm":
|
|
22
|
-
"is-invalid":
|
|
23
|
-
"is-valid":
|
|
24
|
-
"form-control-plaintext":
|
|
25
|
-
"no-validation-icon":
|
|
26
|
-
},
|
|
27
|
-
return /* @__PURE__ */
|
|
14
|
+
id: e,
|
|
15
|
+
isRequired: d,
|
|
16
|
+
isReadOnly: o,
|
|
17
|
+
status: t
|
|
18
|
+
} = v(), c = u({
|
|
19
|
+
"form-control": !o,
|
|
20
|
+
"form-control-lg": r === "lg",
|
|
21
|
+
"form-control-sm": r === "sm",
|
|
22
|
+
"is-invalid": t === "invalid",
|
|
23
|
+
"is-valid": t === "valid",
|
|
24
|
+
"form-control-plaintext": o,
|
|
25
|
+
"no-validation-icon": i
|
|
26
|
+
}, s);
|
|
27
|
+
return /* @__PURE__ */ f("input", { ref: a, id: e, className: c, type: n, placeholder: l, required: d, readOnly: o, ...m });
|
|
28
28
|
});
|
|
29
29
|
export {
|
|
30
|
-
Input,
|
|
31
|
-
|
|
30
|
+
y as Input,
|
|
31
|
+
y as default
|
|
32
32
|
};
|
|
33
|
+
//# sourceMappingURL=Input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.js","sources":["../../../src/components/Input/Input.tsx"],"sourcesContent":["import { forwardRef, Ref } from 'react';\n\nimport clsx from 'clsx';\n\nimport { Size } from '../../types';\nimport { useFormControl } from '../Form/FormContext';\n\nexport type OmitInputProps =\n | 'disabled'\n | 'required'\n | 'size'\n | 'id'\n | 'readOnly';\n\nexport interface InputProps\n extends Omit<React.ComponentPropsWithRef<'input'>, OmitInputProps> {\n /**\n * Control size of input\n */\n size: Size;\n /**\n * Type of input (text, password, ..)\n */\n type: string;\n /**\n * Change text of placeholder\n */\n placeholder?: string;\n /**\n * Disabled status\n */\n disabled?: boolean;\n /**\n * Remove validation icon\n */\n noValidationIcon?: boolean;\n /**\n * Optional class for styling purpose\n */\n className?: string;\n}\n\n/**\n * Input Form Component\n */\n\nexport const Input = forwardRef(\n (\n {\n noValidationIcon,\n placeholder,\n size = 'md',\n type = 'text',\n className,\n ...restProps\n }: InputProps,\n ref: Ref<HTMLInputElement>,\n ) => {\n const { id, isRequired, isReadOnly, status } = useFormControl();\n\n const classes = clsx(\n {\n 'form-control': !isReadOnly,\n 'form-control-lg': size === 'lg',\n 'form-control-sm': size === 'sm',\n 'is-invalid': status === 'invalid',\n 'is-valid': status === 'valid',\n 'form-control-plaintext': isReadOnly,\n 'no-validation-icon': noValidationIcon,\n },\n className,\n );\n\n return (\n <input\n ref={ref}\n id={id}\n className={classes}\n type={type}\n placeholder={placeholder}\n required={isRequired}\n readOnly={isReadOnly}\n {...restProps}\n />\n );\n },\n);\n\nInput.displayName = 'Input';\n\nexport default Input;\n"],"names":["Input","noValidationIcon","placeholder","size","type","className","restProps","ref","id","isRequired","isReadOnly","status","useFormControl","classes","clsx","jsx"],"mappings":";;;;AA8CaA,MAAAA,sBACX,CACE;AAAA,EACEC,kBAAAA;AAAAA,EACAC,aAAAA;AAAAA,EACAC,MAAAA,IAAO;AAAA,EACPC,MAAAA,IAAO;AAAA,EACPC,WAAAA;AAAAA,EACA,GAAGC;AACO,GACZC,MACG;AACG,QAAA;AAAA,IAAEC,IAAAA;AAAAA,IAAIC,YAAAA;AAAAA,IAAYC,YAAAA;AAAAA,IAAYC,QAAAA;AAAAA,MAAWC,EAAe,GAExDC,IAAUC,EACd;AAAA,IACE,gBAAgB,CAACJ;AAAAA,IACjB,mBAAmBP,MAAS;AAAA,IAC5B,mBAAmBA,MAAS;AAAA,IAC5B,cAAcQ,MAAW;AAAA,IACzB,YAAYA,MAAW;AAAA,IACvB,0BAA0BD;AAAAA,IAC1B,sBAAsBT;AAAAA,KAExBI,CACF;AAEA,SACG,gBAAAU,EAAA,SAAA,EACC,KAAAR,GACA,IAAAC,GACA,WAAWK,GACX,MAAAT,GACA,aAAAF,GACA,UAAUO,GACV,UAAUC,GACV,GAAIJ,EACJ,CAAA;AAEN,CACF;"}
|
|
@@ -1,38 +1,39 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, useEffect } from "react";
|
|
3
|
-
import
|
|
4
|
-
import { useTranslation } from "react-i18next";
|
|
5
|
-
import { useFormControl } from "../Form/FormContext.js";
|
|
6
|
-
const
|
|
7
|
-
leftIcon,
|
|
8
|
-
optionalText,
|
|
9
|
-
requiredText = "*",
|
|
10
|
-
children,
|
|
11
|
-
className
|
|
12
|
-
},
|
|
1
|
+
import { jsxs as t, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as h, useEffect as x } from "react";
|
|
3
|
+
import b from "clsx";
|
|
4
|
+
import { useTranslation as q } from "react-i18next";
|
|
5
|
+
import { useFormControl as w } from "../Form/FormContext.js";
|
|
6
|
+
const R = /* @__PURE__ */ h(({
|
|
7
|
+
leftIcon: r,
|
|
8
|
+
optionalText: s,
|
|
9
|
+
requiredText: a = "*",
|
|
10
|
+
children: i,
|
|
11
|
+
className: l
|
|
12
|
+
}, n) => {
|
|
13
13
|
const {
|
|
14
|
-
id,
|
|
15
|
-
isOptional,
|
|
16
|
-
isRequired
|
|
17
|
-
} =
|
|
18
|
-
t
|
|
19
|
-
} =
|
|
20
|
-
"has-icon":
|
|
21
|
-
},
|
|
22
|
-
return
|
|
23
|
-
if (
|
|
14
|
+
id: m,
|
|
15
|
+
isOptional: o,
|
|
16
|
+
isRequired: e
|
|
17
|
+
} = w(), {
|
|
18
|
+
t: c
|
|
19
|
+
} = q(), p = b("form-label", {
|
|
20
|
+
"has-icon": r
|
|
21
|
+
}, l), d = o && !e, f = e && !o;
|
|
22
|
+
return x(() => {
|
|
23
|
+
if (o && e)
|
|
24
24
|
throw new Error("Cannot be optional and required at the same time");
|
|
25
|
-
}, [
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
}, [o, e]), /* @__PURE__ */ t("label", { ref: n, htmlFor: m, className: p, children: [
|
|
26
|
+
r,
|
|
27
|
+
i,
|
|
28
|
+
d && /* @__PURE__ */ t("em", { className: "optional", children: [
|
|
29
29
|
"- ",
|
|
30
|
-
|
|
30
|
+
s ?? c("explorer.optional")
|
|
31
31
|
] }),
|
|
32
|
-
|
|
32
|
+
f && /* @__PURE__ */ u("em", { className: "required", children: a })
|
|
33
33
|
] });
|
|
34
34
|
});
|
|
35
35
|
export {
|
|
36
|
-
Label,
|
|
37
|
-
|
|
36
|
+
R as Label,
|
|
37
|
+
R as default
|
|
38
38
|
};
|
|
39
|
+
//# sourceMappingURL=Label.js.map
|