@ohos-ports/sprucelabs-react-heartwood-components 9.1.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +59 -0
- package/lib/__mocks__/stubs/events.js +166 -0
- package/lib/__mocks__/stubs/events.js.map +1 -0
- package/lib/__mocks__/stubs/location.js +34 -0
- package/lib/__mocks__/stubs/location.js.map +1 -0
- package/lib/__mocks__/stubs/users.js +225 -0
- package/lib/__mocks__/stubs/users.js.map +1 -0
- package/lib/__tests__/components/Pagination/Pagination.test.js +127 -0
- package/lib/__tests__/components/Pagination/Pagination.test.js.map +1 -0
- package/lib/components/Avatar/Avatar-story.js +34 -0
- package/lib/components/Avatar/Avatar-story.js.map +1 -0
- package/lib/components/Avatar/Avatar.d.ts +40 -0
- package/lib/components/Avatar/Avatar.d.ts.map +1 -0
- package/lib/components/Avatar/Avatar.js +91 -0
- package/lib/components/Avatar/Avatar.js.map +1 -0
- package/lib/components/Avatar/UserAvatar.js +45 -0
- package/lib/components/Avatar/UserAvatar.js.map +1 -0
- package/lib/components/BotText/BotText-story.d.ts +2 -0
- package/lib/components/BotText/BotText-story.d.ts.map +1 -0
- package/lib/components/BotText/BotText-story.js +21 -0
- package/lib/components/BotText/BotText-story.js.map +1 -0
- package/lib/components/BotText/BotText.d.ts +12 -0
- package/lib/components/BotText/BotText.d.ts.map +1 -0
- package/lib/components/BotText/BotText.js +52 -0
- package/lib/components/BotText/BotText.js.map +1 -0
- package/lib/components/Button/Button-story.js +109 -0
- package/lib/components/Button/Button-story.js.map +1 -0
- package/lib/components/Button/Button.d.ts +47 -0
- package/lib/components/Button/Button.d.ts.map +1 -0
- package/lib/components/Button/Button.js +155 -0
- package/lib/components/Button/Button.js.map +1 -0
- package/lib/components/ButtonGroup/ButtonGroup-story.js +27 -0
- package/lib/components/ButtonGroup/ButtonGroup-story.js.map +1 -0
- package/lib/components/ButtonGroup/ButtonGroup.d.ts +19 -0
- package/lib/components/ButtonGroup/ButtonGroup.d.ts.map +1 -0
- package/lib/components/ButtonGroup/ButtonGroup.js +64 -0
- package/lib/components/ButtonGroup/ButtonGroup.js.map +1 -0
- package/lib/components/Card/Card-story.d.ts +2 -0
- package/lib/components/Card/Card-story.d.ts.map +1 -0
- package/lib/components/Card/Card-story.js +389 -0
- package/lib/components/Card/Card-story.js.map +1 -0
- package/lib/components/Card/Card.d.ts +69 -0
- package/lib/components/Card/Card.d.ts.map +1 -0
- package/lib/components/Card/Card.js +113 -0
- package/lib/components/Card/Card.js.map +1 -0
- package/lib/components/Card/components/CardBody.d.ts +27 -0
- package/lib/components/Card/components/CardBody.d.ts.map +1 -0
- package/lib/components/Card/components/CardBody.js +45 -0
- package/lib/components/Card/components/CardBody.js.map +1 -0
- package/lib/components/Card/components/CardBuilder.d.ts +50 -0
- package/lib/components/Card/components/CardBuilder.d.ts.map +1 -0
- package/lib/components/Card/components/CardBuilder.js +139 -0
- package/lib/components/Card/components/CardBuilder.js.map +1 -0
- package/lib/components/Card/components/CardFooter.d.ts +11 -0
- package/lib/components/Card/components/CardFooter.d.ts.map +1 -0
- package/lib/components/Card/components/CardFooter.js +22 -0
- package/lib/components/Card/components/CardFooter.js.map +1 -0
- package/lib/components/Card/components/CardHeader.d.ts +28 -0
- package/lib/components/Card/components/CardHeader.d.ts.map +1 -0
- package/lib/components/Card/components/CardHeader.js +70 -0
- package/lib/components/Card/components/CardHeader.js.map +1 -0
- package/lib/components/Card/components/CardSection.d.ts +10 -0
- package/lib/components/Card/components/CardSection.d.ts.map +1 -0
- package/lib/components/Card/components/CardSection.js +27 -0
- package/lib/components/Card/components/CardSection.js.map +1 -0
- package/lib/components/Card/components/OnboardingCard.d.ts +27 -0
- package/lib/components/Card/components/OnboardingCard.d.ts.map +1 -0
- package/lib/components/Card/components/OnboardingCard.js +129 -0
- package/lib/components/Card/components/OnboardingCard.js.map +1 -0
- package/lib/components/Card/components/Scores.d.ts +15 -0
- package/lib/components/Card/components/Scores.d.ts.map +1 -0
- package/lib/components/Card/components/Scores.js +39 -0
- package/lib/components/Card/components/Scores.js.map +1 -0
- package/lib/components/Card/index.d.ts +11 -0
- package/lib/components/Card/index.d.ts.map +1 -0
- package/lib/components/Card/index.js +120 -0
- package/lib/components/Card/index.js.map +1 -0
- package/lib/components/CircleLoader/CircleLoader-story.d.ts +2 -0
- package/lib/components/CircleLoader/CircleLoader-story.d.ts.map +1 -0
- package/lib/components/CircleLoader/CircleLoader-story.js +20 -0
- package/lib/components/CircleLoader/CircleLoader-story.js.map +1 -0
- package/lib/components/CircleLoader/CircleLoader.d.ts +13 -0
- package/lib/components/CircleLoader/CircleLoader.d.ts.map +1 -0
- package/lib/components/CircleLoader/CircleLoader.js +28 -0
- package/lib/components/CircleLoader/CircleLoader.js.map +1 -0
- package/lib/components/ContextMenu/ContextMenu-story.js +31 -0
- package/lib/components/ContextMenu/ContextMenu-story.js.map +1 -0
- package/lib/components/ContextMenu/ContextMenu.d.ts +70 -0
- package/lib/components/ContextMenu/ContextMenu.d.ts.map +1 -0
- package/lib/components/ContextMenu/ContextMenu.js +315 -0
- package/lib/components/ContextMenu/ContextMenu.js.map +1 -0
- package/lib/components/Core/components/FeedBuilder/FeedBuilder-story.js +101 -0
- package/lib/components/Core/components/FeedBuilder/FeedBuilder-story.js.map +1 -0
- package/lib/components/Core/components/FeedBuilder/FeedBuilder.js +290 -0
- package/lib/components/Core/components/FeedBuilder/FeedBuilder.js.map +1 -0
- package/lib/components/Core/components/FooterPrimary/FooterPrimary.js +20 -0
- package/lib/components/Core/components/FooterPrimary/FooterPrimary.js.map +1 -0
- package/lib/components/Core/components/FooterPrimary/components/HelpButton/HelpButton.js +52 -0
- package/lib/components/Core/components/FooterPrimary/components/HelpButton/HelpButton.js.map +1 -0
- package/lib/components/Core/components/FooterPrimary/components/Legal/Legal.js +38 -0
- package/lib/components/Core/components/FooterPrimary/components/Legal/Legal.js.map +1 -0
- package/lib/components/Core/components/FooterPrimary/index.js +30 -0
- package/lib/components/Core/components/FooterPrimary/index.js.map +1 -0
- package/lib/components/Core/components/HeaderPrimary/HeaderPrimary-story.js +134 -0
- package/lib/components/Core/components/HeaderPrimary/HeaderPrimary-story.js.map +1 -0
- package/lib/components/Core/components/HeaderPrimary/HeaderPrimary.js +238 -0
- package/lib/components/Core/components/HeaderPrimary/HeaderPrimary.js.map +1 -0
- package/lib/components/Core/components/HeaderPrimary/components/DefaultLockup/DefaultLockup.js +32 -0
- package/lib/components/Core/components/HeaderPrimary/components/DefaultLockup/DefaultLockup.js.map +1 -0
- package/lib/components/Core/components/HeaderPrimary/components/Hamburger/Hamburger.js +58 -0
- package/lib/components/Core/components/HeaderPrimary/components/Hamburger/Hamburger.js.map +1 -0
- package/lib/components/Core/components/HeaderPrimary/components/LocationMenu/LocationMenu.js +169 -0
- package/lib/components/Core/components/HeaderPrimary/components/LocationMenu/LocationMenu.js.map +1 -0
- package/lib/components/Core/components/HeaderPrimary/components/UserMenu/UserMenu.js +56 -0
- package/lib/components/Core/components/HeaderPrimary/components/UserMenu/UserMenu.js.map +1 -0
- package/lib/components/Core/components/ProfileSummary/ProfileSummary-story.js +26 -0
- package/lib/components/Core/components/ProfileSummary/ProfileSummary-story.js.map +1 -0
- package/lib/components/Core/components/ProfileSummary/ProfileSummary.js +46 -0
- package/lib/components/Core/components/ProfileSummary/ProfileSummary.js.map +1 -0
- package/lib/components/Core/components/SaveBar/SaveBar-story.js +68 -0
- package/lib/components/Core/components/SaveBar/SaveBar-story.js.map +1 -0
- package/lib/components/Core/components/SaveBar/SaveBar.js +127 -0
- package/lib/components/Core/components/SaveBar/SaveBar.js.map +1 -0
- package/lib/components/Core/components/Sidebar/Sidebar-story.js +204 -0
- package/lib/components/Core/components/Sidebar/Sidebar-story.js.map +1 -0
- package/lib/components/Core/components/Sidebar/Sidebar.js +87 -0
- package/lib/components/Core/components/Sidebar/Sidebar.js.map +1 -0
- package/lib/components/Core/components/Sidebar/components/SidebarExpander/SidebarExpander.js +48 -0
- package/lib/components/Core/components/Sidebar/components/SidebarExpander/SidebarExpander.js.map +1 -0
- package/lib/components/Core/components/Sidebar/components/SidebarFooter/SidebarFooter.js +25 -0
- package/lib/components/Core/components/Sidebar/components/SidebarFooter/SidebarFooter.js.map +1 -0
- package/lib/components/Core/components/Sidebar/components/SidebarHeader/SidebarHeader.d.ts +12 -0
- package/lib/components/Core/components/Sidebar/components/SidebarHeader/SidebarHeader.d.ts.map +1 -0
- package/lib/components/Core/components/Sidebar/components/SidebarHeader/SidebarHeader.js +47 -0
- package/lib/components/Core/components/Sidebar/components/SidebarHeader/SidebarHeader.js.map +1 -0
- package/lib/components/Core/components/Sidebar/components/SidebarItem/SidebarItem.js +115 -0
- package/lib/components/Core/components/Sidebar/components/SidebarItem/SidebarItem.js.map +1 -0
- package/lib/components/Core/components/Sidebar/components/SidebarSection/SidebarSection.js +38 -0
- package/lib/components/Core/components/Sidebar/components/SidebarSection/SidebarSection.js.map +1 -0
- package/lib/components/Core/index.js +80 -0
- package/lib/components/Core/index.js.map +1 -0
- package/lib/components/Dropzone/Dropzone-story.js +119 -0
- package/lib/components/Dropzone/Dropzone-story.js.map +1 -0
- package/lib/components/Dropzone/Dropzone.js +317 -0
- package/lib/components/Dropzone/Dropzone.js.map +1 -0
- package/lib/components/EmptyState/EmptyState-story.d.ts +2 -0
- package/lib/components/EmptyState/EmptyState-story.d.ts.map +1 -0
- package/lib/components/EmptyState/EmptyState-story.js +60 -0
- package/lib/components/EmptyState/EmptyState-story.js.map +1 -0
- package/lib/components/EmptyState/EmptyState.d.ts +28 -0
- package/lib/components/EmptyState/EmptyState.d.ts.map +1 -0
- package/lib/components/EmptyState/EmptyState.js +54 -0
- package/lib/components/EmptyState/EmptyState.js.map +1 -0
- package/lib/components/EventDetails/EventDetails-story.d.ts +2 -0
- package/lib/components/EventDetails/EventDetails-story.d.ts.map +1 -0
- package/lib/components/EventDetails/EventDetails-story.js +112 -0
- package/lib/components/EventDetails/EventDetails-story.js.map +1 -0
- package/lib/components/EventDetails/EventDetails.d.ts +18 -0
- package/lib/components/EventDetails/EventDetails.d.ts.map +1 -0
- package/lib/components/EventDetails/EventDetails.js +75 -0
- package/lib/components/EventDetails/EventDetails.js.map +1 -0
- package/lib/components/EventDetails/EventDetailsUtilities.d.ts +11 -0
- package/lib/components/EventDetails/EventDetailsUtilities.d.ts.map +1 -0
- package/lib/components/EventDetails/EventDetailsUtilities.js +56 -0
- package/lib/components/EventDetails/EventDetailsUtilities.js.map +1 -0
- package/lib/components/EventDetails/components/EventDetailsItem/EventDetailsItem.d.ts +18 -0
- package/lib/components/EventDetails/components/EventDetailsItem/EventDetailsItem.d.ts.map +1 -0
- package/lib/components/EventDetails/components/EventDetailsItem/EventDetailsItem.js +111 -0
- package/lib/components/EventDetails/components/EventDetailsItem/EventDetailsItem.js.map +1 -0
- package/lib/components/EventDetails/eventDetailsMock.d.ts +10 -0
- package/lib/components/EventDetails/eventDetailsMock.d.ts.map +1 -0
- package/lib/components/EventDetails/eventDetailsMock.js +840 -0
- package/lib/components/EventDetails/eventDetailsMock.js.map +1 -0
- package/lib/components/FontLoader/FontLoader-story.js +16 -0
- package/lib/components/FontLoader/FontLoader-story.js.map +1 -0
- package/lib/components/FontLoader/FontLoader.js +148 -0
- package/lib/components/FontLoader/FontLoader.js.map +1 -0
- package/lib/components/Forms/FormPartials.js +70 -0
- package/lib/components/Forms/FormPartials.js.map +1 -0
- package/lib/components/Forms/Forms-story.js +297 -0
- package/lib/components/Forms/Forms-story.js.map +1 -0
- package/lib/components/Forms/components/Autosuggest/Autosuggest.d.ts +71 -0
- package/lib/components/Forms/components/Autosuggest/Autosuggest.d.ts.map +1 -0
- package/lib/components/Forms/components/Autosuggest/Autosuggest.js +372 -0
- package/lib/components/Forms/components/Autosuggest/Autosuggest.js.map +1 -0
- package/lib/components/Forms/components/Checkbox/Checkbox.d.ts +23 -0
- package/lib/components/Forms/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/lib/components/Forms/components/Checkbox/Checkbox.js +162 -0
- package/lib/components/Forms/components/Checkbox/Checkbox.js.map +1 -0
- package/lib/components/Forms/components/DatePicker/DatePicker.js +236 -0
- package/lib/components/Forms/components/DatePicker/DatePicker.js.map +1 -0
- package/lib/components/Forms/components/DomainInput/DomainInput.js +29 -0
- package/lib/components/Forms/components/DomainInput/DomainInput.js.map +1 -0
- package/lib/components/Forms/components/DurationInput/DurationInput.js +270 -0
- package/lib/components/Forms/components/DurationInput/DurationInput.js.map +1 -0
- package/lib/components/Forms/components/FormBuilder/FormBuilder-story.js +357 -0
- package/lib/components/Forms/components/FormBuilder/FormBuilder-story.js.map +1 -0
- package/lib/components/Forms/components/FormBuilder/FormBuilder.js +121 -0
- package/lib/components/Forms/components/FormBuilder/FormBuilder.js.map +1 -0
- package/lib/components/Forms/components/FormBuilder/components/FormInner/FormInner.js +201 -0
- package/lib/components/Forms/components/FormBuilder/components/FormInner/FormInner.js.map +1 -0
- package/lib/components/Forms/components/FormLayout/FormLayout.js +35 -0
- package/lib/components/Forms/components/FormLayout/FormLayout.js.map +1 -0
- package/lib/components/Forms/components/FormLayout/components/FormLayoutGroup/FormLayoutGroup.js +30 -0
- package/lib/components/Forms/components/FormLayout/components/FormLayoutGroup/FormLayoutGroup.js.map +1 -0
- package/lib/components/Forms/components/FormLayout/components/FormLayoutItem/FormLayoutItem.js +32 -0
- package/lib/components/Forms/components/FormLayout/components/FormLayoutItem/FormLayoutItem.js.map +1 -0
- package/lib/components/Forms/components/FormLayout/index.js +32 -0
- package/lib/components/Forms/components/FormLayout/index.js.map +1 -0
- package/lib/components/Forms/components/PhoneInput/PhoneInput.d.ts +30 -0
- package/lib/components/Forms/components/PhoneInput/PhoneInput.d.ts.map +1 -0
- package/lib/components/Forms/components/PhoneInput/PhoneInput.js +119 -0
- package/lib/components/Forms/components/PhoneInput/PhoneInput.js.map +1 -0
- package/lib/components/Forms/components/Radio/Radio.d.ts +15 -0
- package/lib/components/Forms/components/Radio/Radio.d.ts.map +1 -0
- package/lib/components/Forms/components/Radio/Radio.js +92 -0
- package/lib/components/Forms/components/Radio/Radio.js.map +1 -0
- package/lib/components/Forms/components/Search/Search.js +96 -0
- package/lib/components/Forms/components/Search/Search.js.map +1 -0
- package/lib/components/Forms/components/Select/Select.js +95 -0
- package/lib/components/Forms/components/Select/Select.js.map +1 -0
- package/lib/components/Forms/components/Slider/Slider.js +100 -0
- package/lib/components/Forms/components/Slider/Slider.js.map +1 -0
- package/lib/components/Forms/components/Stars/Stars.js +101 -0
- package/lib/components/Forms/components/Stars/Stars.js.map +1 -0
- package/lib/components/Forms/components/Tag/Tag.js +60 -0
- package/lib/components/Forms/components/Tag/Tag.js.map +1 -0
- package/lib/components/Forms/components/TextArea/TextArea.js +55 -0
- package/lib/components/Forms/components/TextArea/TextArea.js.map +1 -0
- package/lib/components/Forms/components/TextInput/TextInput.d.ts +28 -0
- package/lib/components/Forms/components/TextInput/TextInput.d.ts.map +1 -0
- package/lib/components/Forms/components/TextInput/TextInput.js +57 -0
- package/lib/components/Forms/components/TextInput/TextInput.js.map +1 -0
- package/lib/components/Forms/components/Toggle/Toggle.d.ts +9 -0
- package/lib/components/Forms/components/Toggle/Toggle.d.ts.map +1 -0
- package/lib/components/Forms/components/Toggle/Toggle.js +43 -0
- package/lib/components/Forms/components/Toggle/Toggle.js.map +1 -0
- package/lib/components/Forms/index.d.ts +18 -0
- package/lib/components/Forms/index.d.ts.map +1 -0
- package/lib/components/Forms/index.js +182 -0
- package/lib/components/Forms/index.js.map +1 -0
- package/lib/components/Heading/Heading-story.js +18 -0
- package/lib/components/Heading/Heading-story.js.map +1 -0
- package/lib/components/Heading/Heading.d.ts +13 -0
- package/lib/components/Heading/Heading.d.ts.map +1 -0
- package/lib/components/Heading/Heading.js +32 -0
- package/lib/components/Heading/Heading.js.map +1 -0
- package/lib/components/Icon/Icon-story.d.ts +2 -0
- package/lib/components/Icon/Icon-story.d.ts.map +1 -0
- package/lib/components/Icon/Icon-story.js +44 -0
- package/lib/components/Icon/Icon-story.js.map +1 -0
- package/lib/components/Icon/Icon.d.ts +13 -0
- package/lib/components/Icon/Icon.d.ts.map +1 -0
- package/lib/components/Icon/Icon.js +52 -0
- package/lib/components/Icon/Icon.js.map +1 -0
- package/lib/components/Image/Image.d.ts +11 -0
- package/lib/components/Image/Image.d.ts.map +1 -0
- package/lib/components/Image/Image.js +32 -0
- package/lib/components/Image/Image.js.map +1 -0
- package/lib/components/ImageCropper/ImageCropper-story.js +219 -0
- package/lib/components/ImageCropper/ImageCropper-story.js.map +1 -0
- package/lib/components/ImageCropper/ImageCropper.js +256 -0
- package/lib/components/ImageCropper/ImageCropper.js.map +1 -0
- package/lib/components/ImageSSR/ImageSSR.js +32 -0
- package/lib/components/ImageSSR/ImageSSR.js.map +1 -0
- package/lib/components/Layout/Layout-story.js +128 -0
- package/lib/components/Layout/Layout-story.js.map +1 -0
- package/lib/components/Layout/Layout.js +43 -0
- package/lib/components/Layout/Layout.js.map +1 -0
- package/lib/components/Layout/components/LayoutSection/LayoutSection.js +38 -0
- package/lib/components/Layout/components/LayoutSection/LayoutSection.js.map +1 -0
- package/lib/components/Layout/index.js +24 -0
- package/lib/components/Layout/index.js.map +1 -0
- package/lib/components/List/List-story.d.ts +2 -0
- package/lib/components/List/List-story.d.ts.map +1 -0
- package/lib/components/List/List-story.js +241 -0
- package/lib/components/List/List-story.js.map +1 -0
- package/lib/components/List/List.d.ts +34 -0
- package/lib/components/List/List.d.ts.map +1 -0
- package/lib/components/List/List.js +83 -0
- package/lib/components/List/List.js.map +1 -0
- package/lib/components/List/components/ExpandableListItem/ExpandableListItem.d.ts +27 -0
- package/lib/components/List/components/ExpandableListItem/ExpandableListItem.d.ts.map +1 -0
- package/lib/components/List/components/ExpandableListItem/ExpandableListItem.js +93 -0
- package/lib/components/List/components/ExpandableListItem/ExpandableListItem.js.map +1 -0
- package/lib/components/List/components/ListHeader/ListHeader.d.ts +16 -0
- package/lib/components/List/components/ListHeader/ListHeader.d.ts.map +1 -0
- package/lib/components/List/components/ListHeader/ListHeader.js +51 -0
- package/lib/components/List/components/ListHeader/ListHeader.js.map +1 -0
- package/lib/components/List/components/ListItem/ListItem.d.ts +67 -0
- package/lib/components/List/components/ListItem/ListItem.d.ts.map +1 -0
- package/lib/components/List/components/ListItem/ListItem.js +206 -0
- package/lib/components/List/components/ListItem/ListItem.js.map +1 -0
- package/lib/components/List/components/SortableList/SortableList.d.ts +35 -0
- package/lib/components/List/components/SortableList/SortableList.d.ts.map +1 -0
- package/lib/components/List/components/SortableList/SortableList.js +180 -0
- package/lib/components/List/components/SortableList/SortableList.js.map +1 -0
- package/lib/components/List/index.d.ts +6 -0
- package/lib/components/List/index.d.ts.map +1 -0
- package/lib/components/List/index.js +74 -0
- package/lib/components/List/index.js.map +1 -0
- package/lib/components/Loader/Loader-story.js +30 -0
- package/lib/components/Loader/Loader-story.js.map +1 -0
- package/lib/components/Loader/Loader.js +36 -0
- package/lib/components/Loader/Loader.js.map +1 -0
- package/lib/components/Loader/Loader.test.js +17 -0
- package/lib/components/Loader/Loader.test.js.map +1 -0
- package/lib/components/MarkdownText/MarkdownText.d.ts +8 -0
- package/lib/components/MarkdownText/MarkdownText.d.ts.map +1 -0
- package/lib/components/MarkdownText/MarkdownText.js +26 -0
- package/lib/components/MarkdownText/MarkdownText.js.map +1 -0
- package/lib/components/Message/Message-story.js +135 -0
- package/lib/components/Message/Message-story.js.map +1 -0
- package/lib/components/Message/Message.js +147 -0
- package/lib/components/Message/Message.js.map +1 -0
- package/lib/components/Message/components/MessageBuilder.js +132 -0
- package/lib/components/Message/components/MessageBuilder.js.map +1 -0
- package/lib/components/Message/index.js +24 -0
- package/lib/components/Message/index.js.map +1 -0
- package/lib/components/Modal/Modal-story.js +239 -0
- package/lib/components/Modal/Modal-story.js.map +1 -0
- package/lib/components/Modal/Modal.js +86 -0
- package/lib/components/Modal/Modal.js.map +1 -0
- package/lib/components/Modal/components/ModalBody/ModalBody.js +30 -0
- package/lib/components/Modal/components/ModalBody/ModalBody.js.map +1 -0
- package/lib/components/Modal/components/ModalFooter/ModalFooter.js +31 -0
- package/lib/components/Modal/components/ModalFooter/ModalFooter.js.map +1 -0
- package/lib/components/Modal/components/ModalHeader/ModalHeader.js +84 -0
- package/lib/components/Modal/components/ModalHeader/ModalHeader.js.map +1 -0
- package/lib/components/Page/Page-story.js +115 -0
- package/lib/components/Page/Page-story.js.map +1 -0
- package/lib/components/Page/Page.js +55 -0
- package/lib/components/Page/Page.js.map +1 -0
- package/lib/components/Page/components/PageContent/PageContent.js +22 -0
- package/lib/components/Page/components/PageContent/PageContent.js.map +1 -0
- package/lib/components/Page/components/PageHeader/PageHeader.js +127 -0
- package/lib/components/Page/components/PageHeader/PageHeader.js.map +1 -0
- package/lib/components/Page/index.js +32 -0
- package/lib/components/Page/index.js.map +1 -0
- package/lib/components/PagedModal/PagedModal-story.js +121 -0
- package/lib/components/PagedModal/PagedModal-story.js.map +1 -0
- package/lib/components/PagedModal/PagedModal.js +84 -0
- package/lib/components/PagedModal/PagedModal.js.map +1 -0
- package/lib/components/Pagination/Pagination-story.js +35 -0
- package/lib/components/Pagination/Pagination-story.js.map +1 -0
- package/lib/components/Pagination/Pagination.js +157 -0
- package/lib/components/Pagination/Pagination.js.map +1 -0
- package/lib/components/RecordSelectionList/RecordSelectList-story.js +491 -0
- package/lib/components/RecordSelectionList/RecordSelectList-story.js.map +1 -0
- package/lib/components/RecordSelectionList/RecordSelectionList.d.ts +112 -0
- package/lib/components/RecordSelectionList/RecordSelectionList.d.ts.map +1 -0
- package/lib/components/RecordSelectionList/RecordSelectionList.js +702 -0
- package/lib/components/RecordSelectionList/RecordSelectionList.js.map +1 -0
- package/lib/components/RecordSelectionList/RecordSelectionListItem.d.ts +5 -0
- package/lib/components/RecordSelectionList/RecordSelectionListItem.d.ts.map +1 -0
- package/lib/components/RecordSelectionList/RecordSelectionListItem.js +20 -0
- package/lib/components/RecordSelectionList/RecordSelectionListItem.js.map +1 -0
- package/lib/components/RecordTable/RecordTable-story.d.ts +2 -0
- package/lib/components/RecordTable/RecordTable-story.d.ts.map +1 -0
- package/lib/components/RecordTable/RecordTable-story.js +242 -0
- package/lib/components/RecordTable/RecordTable-story.js.map +1 -0
- package/lib/components/RecordTable/RecordTable.d.ts +133 -0
- package/lib/components/RecordTable/RecordTable.d.ts.map +1 -0
- package/lib/components/RecordTable/RecordTable.js +523 -0
- package/lib/components/RecordTable/RecordTable.js.map +1 -0
- package/lib/components/SplitButton/SplitButton-story.js +60 -0
- package/lib/components/SplitButton/SplitButton-story.js.map +1 -0
- package/lib/components/SplitButton/SplitButton.d.ts +47 -0
- package/lib/components/SplitButton/SplitButton.d.ts.map +1 -0
- package/lib/components/SplitButton/SplitButton.js +296 -0
- package/lib/components/SplitButton/SplitButton.js.map +1 -0
- package/lib/components/Subheading/Subheading-story.js +18 -0
- package/lib/components/Subheading/Subheading-story.js.map +1 -0
- package/lib/components/Subheading/Subheading.js +40 -0
- package/lib/components/Subheading/Subheading.js.map +1 -0
- package/lib/components/Table/Table-story.js +428 -0
- package/lib/components/Table/Table-story.js.map +1 -0
- package/lib/components/Table/Table.d.ts +63 -0
- package/lib/components/Table/Table.d.ts.map +1 -0
- package/lib/components/Table/Table.js +395 -0
- package/lib/components/Table/Table.js.map +1 -0
- package/lib/components/Table/components/TableFilters/TableFilters.js +31 -0
- package/lib/components/Table/components/TableFilters/TableFilters.js.map +1 -0
- package/lib/components/Table/components/TableSearch/TableSearch.d.ts +7 -0
- package/lib/components/Table/components/TableSearch/TableSearch.d.ts.map +1 -0
- package/lib/components/Table/components/TableSearch/TableSearch.js +30 -0
- package/lib/components/Table/components/TableSearch/TableSearch.js.map +1 -0
- package/lib/components/Table/index.d.ts +4 -0
- package/lib/components/Table/index.d.ts.map +1 -0
- package/lib/components/Table/index.js +40 -0
- package/lib/components/Table/index.js.map +1 -0
- package/lib/components/Tabs/Tabs-story.d.ts +2 -0
- package/lib/components/Tabs/Tabs-story.d.ts.map +1 -0
- package/lib/components/Tabs/Tabs-story.js +36 -0
- package/lib/components/Tabs/Tabs-story.js.map +1 -0
- package/lib/components/Tabs/Tabs.d.ts +40 -0
- package/lib/components/Tabs/Tabs.d.ts.map +1 -0
- package/lib/components/Tabs/Tabs.js +244 -0
- package/lib/components/Tabs/Tabs.js.map +1 -0
- package/lib/components/Tabs/components/Tab/Tab.d.ts +26 -0
- package/lib/components/Tabs/components/Tab/Tab.d.ts.map +1 -0
- package/lib/components/Tabs/components/Tab/Tab.js +46 -0
- package/lib/components/Tabs/components/Tab/Tab.js.map +1 -0
- package/lib/components/Text/Text-story.d.ts +2 -0
- package/lib/components/Text/Text-story.d.ts.map +1 -0
- package/lib/components/Text/Text-story.js +51 -0
- package/lib/components/Text/Text-story.js.map +1 -0
- package/lib/components/Text/Text.d.ts +18 -0
- package/lib/components/Text/Text.d.ts.map +1 -0
- package/lib/components/Text/Text.js +123 -0
- package/lib/components/Text/Text.js.map +1 -0
- package/lib/components/TextContainer/TextContainer-story.js +32 -0
- package/lib/components/TextContainer/TextContainer-story.js.map +1 -0
- package/lib/components/TextContainer/TextContainer.js +33 -0
- package/lib/components/TextContainer/TextContainer.js.map +1 -0
- package/lib/components/TextStyle/TextStyle-story.js +28 -0
- package/lib/components/TextStyle/TextStyle-story.js.map +1 -0
- package/lib/components/TextStyle/TextStyle.js +41 -0
- package/lib/components/TextStyle/TextStyle.js.map +1 -0
- package/lib/components/Toast/Toast-story.d.ts +2 -0
- package/lib/components/Toast/Toast-story.d.ts.map +1 -0
- package/lib/components/Toast/Toast-story.js +210 -0
- package/lib/components/Toast/Toast-story.js.map +1 -0
- package/lib/components/Toast/Toast.d.ts +24 -0
- package/lib/components/Toast/Toast.d.ts.map +1 -0
- package/lib/components/Toast/Toast.js +76 -0
- package/lib/components/Toast/Toast.js.map +1 -0
- package/lib/components/Toast/components/ToastWrapper/ToastWrapper.d.ts +24 -0
- package/lib/components/Toast/components/ToastWrapper/ToastWrapper.d.ts.map +1 -0
- package/lib/components/Toast/components/ToastWrapper/ToastWrapper.js +131 -0
- package/lib/components/Toast/components/ToastWrapper/ToastWrapper.js.map +1 -0
- package/lib/components/TruncatedList/TruncatedList-story.js +222 -0
- package/lib/components/TruncatedList/TruncatedList-story.js.map +1 -0
- package/lib/components/TruncatedList/TruncatedList.d.ts +49 -0
- package/lib/components/TruncatedList/TruncatedList.d.ts.map +1 -0
- package/lib/components/TruncatedList/TruncatedList.js +188 -0
- package/lib/components/TruncatedList/TruncatedList.js.map +1 -0
- package/lib/components/View/View-story.js +485 -0
- package/lib/components/View/View-story.js.map +1 -0
- package/lib/components/View/View.d.ts +26 -0
- package/lib/components/View/View.d.ts.map +1 -0
- package/lib/components/View/View.js +91 -0
- package/lib/components/View/View.js.map +1 -0
- package/lib/components/_utilities/Anchor.js +28 -0
- package/lib/components/_utilities/Anchor.js.map +1 -0
- package/lib/custom-types.d.js +2 -0
- package/lib/custom-types.d.js.map +1 -0
- package/lib/icons.js +3328 -0
- package/lib/icons.js.map +1 -0
- package/lib/index.d.ts +46 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +707 -0
- package/lib/index.js.map +1 -0
- package/lib/stubs/events.js +166 -0
- package/lib/stubs/events.js.map +1 -0
- package/lib/stubs/location.js +34 -0
- package/lib/stubs/location.js.map +1 -0
- package/lib/stubs/users.js +225 -0
- package/lib/stubs/users.js.map +1 -0
- package/lib/utilities.js +23 -0
- package/lib/utilities.js.map +1 -0
- package/package.json +174 -0
- package/static/android-chrome-192x192.png +0 -0
- package/static/android-chrome-256x256.png +0 -0
- package/static/apple-touch-icon.png +0 -0
- package/static/assets/bg.jpeg +0 -0
- package/static/assets/icons/Design/Rotate/rotate-back.svg +9 -0
- package/static/assets/icons/Design/Rotate/rotate-forward.svg +9 -0
- package/static/assets/icons/Interface-Essential/Alerts/alert-triangle--16w.svg +3 -0
- package/static/assets/icons/Interface-Essential/Alerts/alert-triangle--56w.svg +5 -0
- package/static/assets/icons/Interface-Essential/Alerts/alert-triangle.svg +3 -0
- package/static/assets/icons/Interface-Essential/Dashboard/gauge-dashboard-1.svg +11 -0
- package/static/assets/icons/Interface-Essential/Date/Calendar/calendar-3.svg +12 -0
- package/static/assets/icons/Interface-Essential/Date/Calendar/calendar-date.svg +9 -0
- package/static/assets/icons/Interface-Essential/Delete/bin.svg +7 -0
- package/static/assets/icons/Interface-Essential/Edit/pencil-write.svg +5 -0
- package/static/assets/icons/Interface-Essential/Form-Edition/paper-write.svg +8 -0
- package/static/assets/icons/Interface-Essential/Form-Validation/check-circle-1.svg +4 -0
- package/static/assets/icons/Interface-Essential/Help/question-help-square--16w.svg +5 -0
- package/static/assets/icons/Interface-Essential/Help/question-help-square.svg +5 -0
- package/static/assets/icons/Interface-Essential/Home/house-1--16w.svg +4 -0
- package/static/assets/icons/Interface-Essential/Home/house-1.svg +4 -0
- package/static/assets/icons/Interface-Essential/Lists/list-bullets-1.svg +8 -0
- package/static/assets/icons/Interface-Essential/Lock/Unlock/Lock/Unlock-4.svg +5 -0
- package/static/assets/icons/Interface-Essential/Lock/Unlock/lock-6--16w.svg +3 -0
- package/static/assets/icons/Interface-Essential/Lock/Unlock/lock-6.svg +5 -0
- package/static/assets/icons/Interface-Essential/Login/Logout/logout.svg +5 -0
- package/static/assets/icons/Interface-Essential/Menu/navigation-menu-horizontal.svg +5 -0
- package/static/assets/icons/Interface-Essential/Select/cursor-select-4.svg +14 -0
- package/static/assets/icons/Interface-Essential/Time/stopwatch.svg +8 -0
- package/static/assets/icons/Interface-Essential/Time-Files/time-clock-file-check.svg +7 -0
- package/static/assets/icons/Interface-Essential/Time-Files/time-clock-file-upload.svg +9 -0
- package/static/assets/icons/Maps-Navigation/Pins/pin-2.svg +4 -0
- package/static/assets/icons/Maps-Navigation/Pins/pin.svg +4 -0
- package/static/assets/icons/Messages-Chat-Smileys/Conversation/conversation-text--16w.svg +8 -0
- package/static/assets/icons/Messages-Chat-Smileys/Conversation/conversation-text.svg +8 -0
- package/static/assets/icons/Messages-Chat-Smileys/Messages-Speech-Bubbles/messages-bubble-square-text.svg +5 -0
- package/static/assets/icons/Phones-Mobile-Devices/Phone/phone-retro-1.svg +7 -0
- package/static/assets/icons/Programming-Apps-Websites/Plugins/Modules/module-puzzle.svg +3 -0
- package/static/assets/icons/Shopping-E-Commerce/Shops/shop-1--56w.svg +6 -0
- package/static/assets/icons/Shopping-E-Commerce/Shops/shop-1.svg +7 -0
- package/static/assets/icons/Social-Medias-Rewards-Rating/Rating/rating-star-1-1.svg +3 -0
- package/static/assets/icons/Social-Medias-Rewards-Rating/Rating/rating-star-1.svg +3 -0
- package/static/assets/icons/Transportation/Aircraft/aircraft-military-plane.svg +18 -0
- package/static/assets/icons/Users/Geometric-Close-Up-Single-User-Actions-Neutral/single-neutral-actions-image--56w.svg +7 -0
- package/static/assets/icons/Users/Geometric-Close-Up-Single-User-Actions-Neutral/single-neutral-actions-up-down.svg +8 -0
- package/static/assets/icons/Users/Geometric-Close-Up-Single-User-Neutral/single-neutral-id-card-3.svg +8 -0
- package/static/assets/icons/Users/Geometric-Full-Body-Multiple-Users/multiple-users-1.svg +8 -0
- package/static/assets/icons/Work-Office-Companies/Human-Resources/human-resources-search-team--16w.svg +8 -0
- package/static/assets/icons/Work-Office-Companies/Human-Resources/human-resources-search-team.svg +8 -0
- package/static/assets/icons/ic_add.svg +5 -0
- package/static/assets/icons/ic_add_circle_outline.svg +3 -0
- package/static/assets/icons/ic_arrow_back.svg +3 -0
- package/static/assets/icons/ic_arrow_drop_down.svg +3 -0
- package/static/assets/icons/ic_arrow_forward.svg +3 -0
- package/static/assets/icons/ic_button.svg +3 -0
- package/static/assets/icons/ic_calendar.svg +12 -0
- package/static/assets/icons/ic_cancel.svg +8 -0
- package/static/assets/icons/ic_caution.svg +3 -0
- package/static/assets/icons/ic_caution_light_large.svg +5 -0
- package/static/assets/icons/ic_check_box.svg +3 -0
- package/static/assets/icons/ic_check_box_outline_blank.svg +3 -0
- package/static/assets/icons/ic_check_circle.svg +3 -0
- package/static/assets/icons/ic_close.svg +3 -0
- package/static/assets/icons/ic_colors.svg +8 -0
- package/static/assets/icons/ic_complete.svg +4 -0
- package/static/assets/icons/ic_css.svg +7 -0
- package/static/assets/icons/ic_dashboard.svg +11 -0
- package/static/assets/icons/ic_date.svg +9 -0
- package/static/assets/icons/ic_date_disable.svg +8 -0
- package/static/assets/icons/ic_delete.svg +7 -0
- package/static/assets/icons/ic_disable.svg +3 -0
- package/static/assets/icons/ic_drag_handle.svg +3 -0
- package/static/assets/icons/ic_drop_light_large.svg +14 -0
- package/static/assets/icons/ic_edit.svg +5 -0
- package/static/assets/icons/ic_email.svg +6 -0
- package/static/assets/icons/ic_fonts.svg +6 -0
- package/static/assets/icons/ic_fullscreen.svg +3 -0
- package/static/assets/icons/ic_fullscreen_exit.svg +3 -0
- package/static/assets/icons/ic_guests.svg +8 -0
- package/static/assets/icons/ic_help.svg +5 -0
- package/static/assets/icons/ic_home.svg +4 -0
- package/static/assets/icons/ic_indeterminate_check_box.svg +3 -0
- package/static/assets/icons/ic_keyboard_arrow_left.svg +3 -0
- package/static/assets/icons/ic_keyboard_arrow_right.svg +3 -0
- package/static/assets/icons/ic_late.svg +5 -0
- package/static/assets/icons/ic_launch.svg +18 -0
- package/static/assets/icons/ic_location.svg +4 -0
- package/static/assets/icons/ic_logout.svg +5 -0
- package/static/assets/icons/ic_menu.svg +3 -0
- package/static/assets/icons/ic_message.svg +5 -0
- package/static/assets/icons/ic_message_failed.svg +7 -0
- package/static/assets/icons/ic_messages.svg +8 -0
- package/static/assets/icons/ic_more.svg +5 -0
- package/static/assets/icons/ic_new_tab.svg +3 -0
- package/static/assets/icons/ic_note.svg +8 -0
- package/static/assets/icons/ic_payment_failed_solid.svg +5 -0
- package/static/assets/icons/ic_payment_success_solid.svg +5 -0
- package/static/assets/icons/ic_phone.svg +7 -0
- package/static/assets/icons/ic_pin.svg +4 -0
- package/static/assets/icons/ic_pin_outline.svg +4 -0
- package/static/assets/icons/ic_power.svg +4 -0
- package/static/assets/icons/ic_private.svg +5 -0
- package/static/assets/icons/ic_profile_image_light_large.svg +7 -0
- package/static/assets/icons/ic_public.svg +5 -0
- package/static/assets/icons/ic_radio_button_checked.svg +3 -0
- package/static/assets/icons/ic_radio_button_unchecked.svg +3 -0
- package/static/assets/icons/ic_rotate_left.svg +9 -0
- package/static/assets/icons/ic_rotate_right.svg +9 -0
- package/static/assets/icons/ic_search.svg +3 -0
- package/static/assets/icons/ic_settings.svg +4 -0
- package/static/assets/icons/ic_shop_light_large.svg +6 -0
- package/static/assets/icons/ic_show.svg +4 -0
- package/static/assets/icons/ic_skill.svg +3 -0
- package/static/assets/icons/ic_star_outline.svg +3 -0
- package/static/assets/icons/ic_star_solid.svg +3 -0
- package/static/assets/icons/ic_status.svg +8 -0
- package/static/assets/icons/ic_store.svg +7 -0
- package/static/assets/icons/ic_switch_users.svg +8 -0
- package/static/assets/icons/ic_team.svg +8 -0
- package/static/assets/icons/ic_teammates.svg +8 -0
- package/static/assets/icons/ic_unordered_list.svg +8 -0
- package/static/assets/icons/ic_upload.svg +8 -0
- package/static/assets/icons/ic_upload_file_light_large.svg +9 -0
- package/static/assets/icons/ic_upload_file_success_light_large.svg +7 -0
- package/static/assets/icons/ic_user_avatar.svg +3 -0
- package/static/assets/icons/ic_wifi.svg +9 -0
- package/static/assets/icons/s-ic_spruce-logo-02.svg +3 -0
- package/static/assets/icons/s-ic_spruce-logo.svg +3 -0
- package/static/assets/logo.png +0 -0
- package/static/assets/users/user-01--96w.png +0 -0
- package/static/assets/users/user-01.png +0 -0
- package/static/assets/users/user-02--96w.png +0 -0
- package/static/assets/users/user-03--96w.png +0 -0
- package/static/assets/users/user-04--96w.png +0 -0
- package/static/assets/users/user-04.png +0 -0
- package/static/assets/users/user-05--96w.png +0 -0
- package/static/assets/users/user-05.png +0 -0
- package/static/assets/users/user-06--96w.png +0 -0
- package/static/assets/users/user-06.png +0 -0
- package/static/assets/users/user-07--96w.png +0 -0
- package/static/assets/users/user-07.png +0 -0
- package/static/assets/users/user-08--96w.png +0 -0
- package/static/assets/users/user-08.png +0 -0
- package/static/assets/users/user-09--96w.png +0 -0
- package/static/assets/users/user-09.png +0 -0
- package/static/assets/users/user-placeholder--96w.png +0 -0
- package/static/assets/users/user-placeholder.png +0 -0
- package/static/browserconfig.xml +9 -0
- package/static/favicon-16x16.png +0 -0
- package/static/favicon-32x32.png +0 -0
- package/static/favicon.ico +0 -0
- package/static/mstile-150x150.png +0 -0
- package/static/safari-pinned-tab.svg +26 -0
- package/static/site.webmanifest +19 -0
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports["default"] = void 0;
|
|
11
|
+
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
14
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
|
+
|
|
16
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
17
|
+
|
|
18
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
19
|
+
|
|
20
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
21
|
+
|
|
22
|
+
var _getPrototypeOf3 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
23
|
+
|
|
24
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
25
|
+
|
|
26
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
27
|
+
|
|
28
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
29
|
+
|
|
30
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
31
|
+
|
|
32
|
+
var _reactDropzone = _interopRequireDefault(require("react-dropzone"));
|
|
33
|
+
|
|
34
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
35
|
+
|
|
36
|
+
var _FormPartials = require("../Forms/FormPartials");
|
|
37
|
+
|
|
38
|
+
var _Button = _interopRequireDefault(require("../Button/Button"));
|
|
39
|
+
|
|
40
|
+
var DefaultIcon = function DefaultIcon(props) {
|
|
41
|
+
return _react["default"].createElement("svg", props, _react["default"].createElement("path", {
|
|
42
|
+
d: "M24.5 54.833h-21a2.333 2.333 0 0 1-2.333-2.334v-49A2.333 2.333 0 0 1 3.5 1.166h31.017c.62 0 1.213.248 1.65.686l8.65 8.647c.437.438.683 1.031.683 1.65v7.684M20.855 36.096a11.667 11.667 0 1 1 12.297-15.53",
|
|
43
|
+
strokeLinecap: "round",
|
|
44
|
+
strokeLinejoin: "round"
|
|
45
|
+
}), _react["default"].createElement("path", {
|
|
46
|
+
d: "M22.167 17.502v7h4.666",
|
|
47
|
+
strokeLinecap: "round",
|
|
48
|
+
strokeLinejoin: "round"
|
|
49
|
+
}), _react["default"].createElement("path", {
|
|
50
|
+
clipRule: "evenodd",
|
|
51
|
+
d: "M40.833 54.836c7.732 0 14-6.268 14-14s-6.268-14-14-14-14 6.268-14 14 6.268 14 14 14z",
|
|
52
|
+
strokeLinecap: "round",
|
|
53
|
+
strokeLinejoin: "round"
|
|
54
|
+
}), _react["default"].createElement("path", {
|
|
55
|
+
d: "M40.833 47.836v-14M40.833 33.836l-5.25 5.25M40.833 33.836l5.25 5.25",
|
|
56
|
+
strokeLinecap: "round",
|
|
57
|
+
strokeLinejoin: "round"
|
|
58
|
+
}));
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
DefaultIcon.defaultProps = {
|
|
62
|
+
width: "56",
|
|
63
|
+
height: "56",
|
|
64
|
+
viewBox: "0 0 56 56",
|
|
65
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
var UploadedIcon = function UploadedIcon(props) {
|
|
69
|
+
return _react["default"].createElement("svg", props, _react["default"].createElement("path", {
|
|
70
|
+
d: "M24.5 54.833h-21a2.333 2.333 0 0 1-2.333-2.334v-49A2.333 2.333 0 0 1 3.5 1.166h31.017c.62 0 1.213.248 1.65.686l8.65 8.647c.437.438.683 1.031.683 1.65v7.684M21.098 36.119A11.667 11.667 0 1 1 33.6 22.165",
|
|
71
|
+
strokeLinecap: "round",
|
|
72
|
+
strokeLinejoin: "round"
|
|
73
|
+
}), _react["default"].createElement("path", {
|
|
74
|
+
d: "M22.167 17.502v7h4.666",
|
|
75
|
+
strokeLinecap: "round",
|
|
76
|
+
strokeLinejoin: "round"
|
|
77
|
+
}), _react["default"].createElement("path", {
|
|
78
|
+
clipRule: "evenodd",
|
|
79
|
+
d: "M40.833 54.836c7.732 0 14-6.268 14-14s-6.268-14-14-14-14 6.268-14 14 6.268 14 14 14z",
|
|
80
|
+
strokeLinecap: "round",
|
|
81
|
+
strokeLinejoin: "round"
|
|
82
|
+
}), _react["default"].createElement("path", {
|
|
83
|
+
d: "M47.073 36.764l-6.779 9.039a1.752 1.752 0 0 1-2.639.187l-3.5-3.5",
|
|
84
|
+
strokeLinecap: "round",
|
|
85
|
+
strokeLinejoin: "round"
|
|
86
|
+
}));
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
UploadedIcon.defaultProps = {
|
|
90
|
+
width: "56",
|
|
91
|
+
height: "56",
|
|
92
|
+
viewBox: "0 0 56 56",
|
|
93
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
var DropIcon = function DropIcon(props) {
|
|
97
|
+
return _react["default"].createElement("svg", props, _react["default"].createElement("path", {
|
|
98
|
+
clipRule: "evenodd",
|
|
99
|
+
d: "M38.656 53.605c-.154.623-.466.642-.7.042l-9.165-24.115c-.233-.6.077-.905.677-.681l24.215 9.081c.6.233.583.537-.04.7L41.575 41.65l-2.919 11.956z",
|
|
100
|
+
strokeLinecap: "round",
|
|
101
|
+
strokeLinejoin: "round"
|
|
102
|
+
}), _react["default"].createElement("path", {
|
|
103
|
+
d: "M47.322 28.973c-.098.422-.198.844-.31 1.264M29.115 47.268c-.966.119-1.918.354-2.89.38M19.273 47.133a23.243 23.243 0 0 1-5.467-1.989M9.06 41.92a23.867 23.867 0 0 1-3.87-4.34M2.147 31.303a24.065 24.065 0 0 1-.98-5.733M1.561 19.834a23.675 23.675 0 0 1 1.867-5.512M7.34 8.566a22.798 22.798 0 0 1 4.448-3.748M16.961 2.319c.908-.35 1.867-.518 2.8-.78.97-.119 1.923-.352 2.896-.373M29.61 1.666a23.238 23.238 0 0 1 5.467 1.986M39.82 6.887a23.727 23.727 0 0 1 3.874 4.342M46.737 17.5c.557 1.864.886 3.79.98 5.733",
|
|
104
|
+
strokeLinecap: "round",
|
|
105
|
+
strokeLinejoin: "round"
|
|
106
|
+
}));
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
DropIcon.defaultProps = {
|
|
110
|
+
width: "56",
|
|
111
|
+
height: "56",
|
|
112
|
+
viewBox: "0 0 56 56",
|
|
113
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
var WarnIcon = function WarnIcon(props) {
|
|
117
|
+
return _react["default"].createElement("svg", props, _react["default"].createElement("path", {
|
|
118
|
+
clipRule: "evenodd",
|
|
119
|
+
d: "M52.624 48.247c.313.4.334.932.051 1.35-.282.418-.812.64-1.342.56H4.667c-.53.08-1.06-.142-1.342-.56a1.132 1.132 0 0 1 .051-1.35L26.957 5.064c.574-1.051 1.512-1.051 2.086 0l23.58 43.183z",
|
|
120
|
+
strokeLinecap: "round",
|
|
121
|
+
strokeLinejoin: "round"
|
|
122
|
+
}), _react["default"].createElement("path", {
|
|
123
|
+
d: "M28 36.279V21.322M27.979 40.55a.6.6 0 0 0-.406.165.502.502 0 0 0-.156.38c.012.292.273.523.592.524h.012a.6.6 0 0 0 .406-.164.501.501 0 0 0 .156-.38c-.012-.29-.268-.519-.583-.524h-.012",
|
|
124
|
+
strokeLinecap: "round",
|
|
125
|
+
strokeLinejoin: "round"
|
|
126
|
+
}));
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
WarnIcon.defaultProps = {
|
|
130
|
+
width: "56",
|
|
131
|
+
height: "52",
|
|
132
|
+
viewBox: "0 0 56 52",
|
|
133
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
var Dropzone =
|
|
137
|
+
/*#__PURE__*/
|
|
138
|
+
function (_Component) {
|
|
139
|
+
(0, _inherits2["default"])(Dropzone, _Component);
|
|
140
|
+
|
|
141
|
+
function Dropzone() {
|
|
142
|
+
var _getPrototypeOf2;
|
|
143
|
+
|
|
144
|
+
var _this;
|
|
145
|
+
|
|
146
|
+
(0, _classCallCheck2["default"])(this, Dropzone);
|
|
147
|
+
|
|
148
|
+
for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
149
|
+
_args[_key] = arguments[_key];
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
_this = (0, _possibleConstructorReturn2["default"])(this, (_getPrototypeOf2 = (0, _getPrototypeOf3["default"])(Dropzone)).call.apply(_getPrototypeOf2, [this].concat(_args)));
|
|
153
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onDragEnter", function () {
|
|
154
|
+
var onDragEnter = _this.props.onDragEnter;
|
|
155
|
+
|
|
156
|
+
if (onDragEnter) {
|
|
157
|
+
onDragEnter();
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
_this.setState({
|
|
161
|
+
userCanDrop: true
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onDragLeave", function () {
|
|
165
|
+
var onDragLeave = _this.props.onDragLeave;
|
|
166
|
+
|
|
167
|
+
if (onDragLeave) {
|
|
168
|
+
onDragLeave.apply(void 0, arguments);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
_this.setState({
|
|
172
|
+
userCanDrop: false
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onDragOver", function () {
|
|
176
|
+
var onDragOver = _this.props.onDragOver;
|
|
177
|
+
|
|
178
|
+
if (onDragOver) {
|
|
179
|
+
onDragOver.apply(void 0, arguments);
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onDragStart", function () {
|
|
183
|
+
var onDragStart = _this.props.onDragStart;
|
|
184
|
+
|
|
185
|
+
if (onDragStart) {
|
|
186
|
+
onDragStart.apply(void 0, arguments);
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onDrop", function () {
|
|
190
|
+
var onDrop = _this.props.onDrop;
|
|
191
|
+
|
|
192
|
+
if (onDrop) {
|
|
193
|
+
onDrop.apply(void 0, arguments);
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onDropAccepted", function () {
|
|
197
|
+
var onDropAccepted = _this.props.onDropAccepted;
|
|
198
|
+
|
|
199
|
+
if (onDropAccepted) {
|
|
200
|
+
onDropAccepted.apply(void 0, arguments);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
_this.setState({
|
|
204
|
+
userCanDrop: false
|
|
205
|
+
});
|
|
206
|
+
});
|
|
207
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onDropRejected", function () {
|
|
208
|
+
var onDropRejected = _this.props.onDropRejected;
|
|
209
|
+
|
|
210
|
+
if (onDropRejected) {
|
|
211
|
+
onDropRejected.apply(void 0, arguments);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
_this.setState({
|
|
215
|
+
userCanDrop: false
|
|
216
|
+
});
|
|
217
|
+
});
|
|
218
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onFileDialogCancel", function () {
|
|
219
|
+
var onFileDialogCancel = _this.props.onFileDialogCancel;
|
|
220
|
+
|
|
221
|
+
if (onFileDialogCancel) {
|
|
222
|
+
onFileDialogCancel.apply(void 0, arguments);
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
return _this;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
(0, _createClass2["default"])(Dropzone, [{
|
|
229
|
+
key: "render",
|
|
230
|
+
value: function render() {
|
|
231
|
+
var _this2 = this;
|
|
232
|
+
|
|
233
|
+
var _this$props = this.props,
|
|
234
|
+
id = _this$props.id,
|
|
235
|
+
label = _this$props.label,
|
|
236
|
+
postLabel = _this$props.postLabel,
|
|
237
|
+
buttonText = _this$props.buttonText,
|
|
238
|
+
error = _this$props.error,
|
|
239
|
+
isSmall = _this$props.isSmall,
|
|
240
|
+
isCircular = _this$props.isCircular,
|
|
241
|
+
fileWasUploaded = _this$props.fileWasUploaded,
|
|
242
|
+
uploadProgress = _this$props.uploadProgress,
|
|
243
|
+
defaultIcon = _this$props.defaultIcon,
|
|
244
|
+
rest = (0, _objectWithoutProperties2["default"])(_this$props, ["id", "label", "postLabel", "buttonText", "error", "isSmall", "isCircular", "fileWasUploaded", "uploadProgress", "defaultIcon"]);
|
|
245
|
+
var defaultClass = (0, _classnames["default"])('dropzone', {
|
|
246
|
+
'dropzone-small': isSmall,
|
|
247
|
+
'dropzone-circular': isCircular
|
|
248
|
+
});
|
|
249
|
+
return _react["default"].createElement(_react.Fragment, null, label && _react["default"].createElement(_FormPartials.InputPre, {
|
|
250
|
+
id: id,
|
|
251
|
+
label: label,
|
|
252
|
+
postLabel: postLabel
|
|
253
|
+
}), _react["default"].createElement(_reactDropzone["default"], (0, _extends2["default"])({
|
|
254
|
+
ref: function ref(_ref2) {
|
|
255
|
+
return _this2.dropzone = _ref2;
|
|
256
|
+
},
|
|
257
|
+
className: defaultClass,
|
|
258
|
+
activeClassName: "dropzone--is-hovered",
|
|
259
|
+
rejectClassName: "dropzone--has-error",
|
|
260
|
+
disabledClassName: "dropzone--is-disabled",
|
|
261
|
+
onDragEnter: this.onDragEnter,
|
|
262
|
+
onDragLeave: this.onDragLeave,
|
|
263
|
+
onDragOver: this.onDragOver,
|
|
264
|
+
onDragStart: this.onDragStart,
|
|
265
|
+
onDrop: this.onDrop,
|
|
266
|
+
onDropAccepted: this.onDropAccepted,
|
|
267
|
+
onDropRejected: this.onDropRejected,
|
|
268
|
+
onFileDialogCancel: this.onFileDialogCancel,
|
|
269
|
+
disabled: !!uploadProgress
|
|
270
|
+
}, rest), function (_ref) {
|
|
271
|
+
var isDragAccept = _ref.isDragAccept,
|
|
272
|
+
isDragReject = _ref.isDragReject;
|
|
273
|
+
return _react["default"].createElement(_react.Fragment, null, !!uploadProgress && _react["default"].createElement(_react.Fragment, null, _react["default"].createElement("p", {
|
|
274
|
+
className: "dropzone__helper-text"
|
|
275
|
+
}, "Uploading\u2026"), _react["default"].createElement("div", {
|
|
276
|
+
className: "dropzone__uploading-progress-wrapper"
|
|
277
|
+
}, _react["default"].createElement("div", {
|
|
278
|
+
className: "dropzone__uploading-progress",
|
|
279
|
+
style: {
|
|
280
|
+
width: "".concat(uploadProgress, "%")
|
|
281
|
+
}
|
|
282
|
+
}))), _react["default"].createElement("div", {
|
|
283
|
+
className: "dropzone__icons"
|
|
284
|
+
}, !uploadProgress && !isDragAccept && !isDragReject && _react["default"].createElement(_react.Fragment, null, fileWasUploaded ? _react["default"].createElement(UploadedIcon, {
|
|
285
|
+
className: "dropzone__icon dropzone__did-upload-icon"
|
|
286
|
+
}) : defaultIcon || _react["default"].createElement(DefaultIcon, {
|
|
287
|
+
className: "dropzone__icon"
|
|
288
|
+
})), isDragAccept && _react["default"].createElement(DropIcon, {
|
|
289
|
+
className: "dropzone__icon dropzone__allow-drop-icon"
|
|
290
|
+
}), isDragReject && _react["default"].createElement(WarnIcon, {
|
|
291
|
+
className: "dropzone__icon dropzone__warn-drop-icon"
|
|
292
|
+
})), _react["default"].createElement(_Button["default"], {
|
|
293
|
+
kind: isSmall ? 'simple' : 'secondary',
|
|
294
|
+
isSmall: isSmall,
|
|
295
|
+
text: buttonText,
|
|
296
|
+
className: "dropzone__btn",
|
|
297
|
+
disabled: !!uploadProgress
|
|
298
|
+
}), !isCircular && _react["default"].createElement(_react.Fragment, null, _react["default"].createElement("p", {
|
|
299
|
+
className: "dropzone__text"
|
|
300
|
+
}, "or drop files to upload"), isDragAccept && _react["default"].createElement("p", {
|
|
301
|
+
className: "dropzone__helper-text-bottom dropzone__helper-text-accepted"
|
|
302
|
+
}, "Drop files to upload them"), isDragReject && _react["default"].createElement("p", {
|
|
303
|
+
className: "dropzone__helper-text-bottom dropzone__helper-text-rejected"
|
|
304
|
+
}, error)));
|
|
305
|
+
}));
|
|
306
|
+
}
|
|
307
|
+
}]);
|
|
308
|
+
return Dropzone;
|
|
309
|
+
}(_react.Component);
|
|
310
|
+
|
|
311
|
+
exports["default"] = Dropzone;
|
|
312
|
+
(0, _defineProperty2["default"])(Dropzone, "defaultProps", {
|
|
313
|
+
fileWasUploaded: false,
|
|
314
|
+
isSmall: false,
|
|
315
|
+
isCircular: false
|
|
316
|
+
});
|
|
317
|
+
//# sourceMappingURL=Dropzone.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Dropzone/Dropzone.js"],"names":["DefaultIcon","UploadedIcon","DropIcon","WarnIcon","Dropzone","onDragEnter","props","setState","userCanDrop","onDragLeave","onDragOver","onDragStart","onDrop","onDropAccepted","onDropRejected","onFileDialogCancel","id","label","postLabel","buttonText","error","isSmall","isCircular","fileWasUploaded","uploadProgress","defaultIcon","rest","defaultClass","ref","dropzone","isDragAccept","isDragReject","width","Component"],"mappings":"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","sourcesContent":["// @flow\nimport React, { Component, Fragment } from 'react'\nimport type { Node } from 'react'\nimport ReactDropzone from 'react-dropzone'\nimport cx from 'classnames'\nimport { InputPre } from '../Forms/FormPartials'\nimport Button from '../Button/Button'\nimport DefaultIcon from '../../../static/assets/icons/Interface-Essential/Time-Files/time-clock-file-upload.svg'\nimport UploadedIcon from '../../../static/assets/icons/Interface-Essential/Time-Files/time-clock-file-check.svg'\nimport DropIcon from '../../../static/assets/icons/Interface-Essential/Select/cursor-select-4.svg'\nimport WarnIcon from '../../../static/assets/icons/Interface-Essential/Alerts/alert-triangle--56w.svg'\n\nexport type Props = {\n\t/** Unique identifier for the dropzone */\n\tid: string,\n\n\t/** Callback when file(s) are dropped */\n\tonDrop: Function,\n\n\t/** Text for the button */\n\tbuttonText: string,\n\n\t/** Text shown when file(s) are dropped that aren't accepted */\n\terror: string,\n\n\t/** Displays progress while uploading */\n\tuploadProgress: number,\n\n\t/** onDragEnter callback */\n\tonDragEnter?: Function,\n\n\t/** onDragLeave callback */\n\tonDragLeave?: Function,\n\n\t/** onDragOver callback */\n\tonDragOver?: Function,\n\n\t/** onDrop callback */\n\tonDrop?: Function,\n\n\t/** onDropAccepted callback */\n\tonDropAccepted: Function,\n\n\t/** onDropRejected callback */\n\tonDropRejected?: Function,\n\n\t/** onFileDialogCancel callback */\n\tonFileDialogCancel?: Function,\n\n\t/** onDragStart callback */\n\tonDragStart?: Function,\n\n\t/** Optional label for the Dropzone */\n\tlabel: ?string,\n\n\t/** Optional text to show after the label */\n\tpostLabel?: string,\n\n\t/** Set true to use a smaller Dropzone */\n\tisSmall?: boolean,\n\n\t/** Set true to make the Dropzone circular. Should only be used when isSmall is set to true */\n\tisCircular?: boolean,\n\n\t/** Set true when a file has been successfully uploaded */\n\tfileWasUploaded?: boolean,\n\n\t/** The icon to display before an upload has happened */\n\tdefaultIcon?: Node\n}\n\ntype State = {\n\tuserCanDrop: boolean\n}\n\nexport default class Dropzone extends Component<Props, State> {\n\tdropzone: any\n\n\tstatic defaultProps = {\n\t\tfileWasUploaded: false,\n\t\tisSmall: false,\n\t\tisCircular: false\n\t}\n\n\tonDragEnter = () => {\n\t\tconst { onDragEnter } = this.props\n\t\tif (onDragEnter) {\n\t\t\tonDragEnter()\n\t\t}\n\t\tthis.setState({\n\t\t\tuserCanDrop: true\n\t\t})\n\t}\n\tonDragLeave = (...args) => {\n\t\tconst { onDragLeave } = this.props\n\t\tif (onDragLeave) {\n\t\t\tonDragLeave(...args)\n\t\t}\n\t\tthis.setState({\n\t\t\tuserCanDrop: false\n\t\t})\n\t}\n\tonDragOver = (...args) => {\n\t\tconst { onDragOver } = this.props\n\t\tif (onDragOver) {\n\t\t\tonDragOver(...args)\n\t\t}\n\t}\n\tonDragStart = (...args) => {\n\t\tconst { onDragStart } = this.props\n\t\tif (onDragStart) {\n\t\t\tonDragStart(...args)\n\t\t}\n\t}\n\tonDrop = (...args) => {\n\t\tconst { onDrop } = this.props\n\t\tif (onDrop) {\n\t\t\tonDrop(...args)\n\t\t}\n\t}\n\tonDropAccepted = (...args) => {\n\t\tconst { onDropAccepted } = this.props\n\t\tif (onDropAccepted) {\n\t\t\tonDropAccepted(...args)\n\t\t}\n\t\tthis.setState({\n\t\t\tuserCanDrop: false\n\t\t})\n\t}\n\tonDropRejected = (...args) => {\n\t\tconst { onDropRejected } = this.props\n\t\tif (onDropRejected) {\n\t\t\tonDropRejected(...args)\n\t\t}\n\t\tthis.setState({\n\t\t\tuserCanDrop: false\n\t\t})\n\t}\n\tonFileDialogCancel = (...args) => {\n\t\tconst { onFileDialogCancel } = this.props\n\t\tif (onFileDialogCancel) {\n\t\t\tonFileDialogCancel(...args)\n\t\t}\n\t}\n\trender() {\n\t\tconst {\n\t\t\tid,\n\t\t\tlabel,\n\t\t\tpostLabel,\n\t\t\tbuttonText,\n\t\t\terror,\n\t\t\tisSmall,\n\t\t\tisCircular,\n\t\t\tfileWasUploaded,\n\t\t\tuploadProgress,\n\t\t\tdefaultIcon,\n\t\t\t...rest\n\t\t} = this.props\n\t\tconst defaultClass = cx('dropzone', {\n\t\t\t'dropzone-small': isSmall,\n\t\t\t'dropzone-circular': isCircular\n\t\t})\n\t\treturn (\n\t\t\t<Fragment>\n\t\t\t\t{label && <InputPre id={id} label={label} postLabel={postLabel} />}\n\t\t\t\t<ReactDropzone\n\t\t\t\t\tref={ref => (this.dropzone = ref)}\n\t\t\t\t\tclassName={defaultClass}\n\t\t\t\t\tactiveClassName=\"dropzone--is-hovered\"\n\t\t\t\t\trejectClassName=\"dropzone--has-error\"\n\t\t\t\t\tdisabledClassName=\"dropzone--is-disabled\"\n\t\t\t\t\tonDragEnter={this.onDragEnter}\n\t\t\t\t\tonDragLeave={this.onDragLeave}\n\t\t\t\t\tonDragOver={this.onDragOver}\n\t\t\t\t\tonDragStart={this.onDragStart}\n\t\t\t\t\tonDrop={this.onDrop}\n\t\t\t\t\tonDropAccepted={this.onDropAccepted}\n\t\t\t\t\tonDropRejected={this.onDropRejected}\n\t\t\t\t\tonFileDialogCancel={this.onFileDialogCancel}\n\t\t\t\t\tdisabled={!!uploadProgress}\n\t\t\t\t\t{...rest}\n\t\t\t\t>\n\t\t\t\t\t{({ isDragAccept, isDragReject }) => (\n\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t{!!uploadProgress && (\n\t\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t\t<p className=\"dropzone__helper-text\">Uploading…</p>\n\t\t\t\t\t\t\t\t\t<div className=\"dropzone__uploading-progress-wrapper\">\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"dropzone__uploading-progress\"\n\t\t\t\t\t\t\t\t\t\t\tstyle={{ width: `${uploadProgress}%` }}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<div className=\"dropzone__icons\">\n\t\t\t\t\t\t\t\t{!uploadProgress && !isDragAccept && !isDragReject && (\n\t\t\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t\t\t{fileWasUploaded ? (\n\t\t\t\t\t\t\t\t\t\t\t<UploadedIcon className=\"dropzone__icon dropzone__did-upload-icon\" />\n\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\tdefaultIcon || <DefaultIcon className=\"dropzone__icon\" />\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{isDragAccept && (\n\t\t\t\t\t\t\t\t\t<DropIcon className=\"dropzone__icon dropzone__allow-drop-icon\" />\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{isDragReject && (\n\t\t\t\t\t\t\t\t\t<WarnIcon className=\"dropzone__icon dropzone__warn-drop-icon\" />\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tkind={isSmall ? 'simple' : 'secondary'}\n\t\t\t\t\t\t\t\tisSmall={isSmall}\n\t\t\t\t\t\t\t\ttext={buttonText}\n\t\t\t\t\t\t\t\tclassName=\"dropzone__btn\"\n\t\t\t\t\t\t\t\tdisabled={!!uploadProgress}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{!isCircular && (\n\t\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t\t<p className=\"dropzone__text\">or drop files to upload</p>\n\t\t\t\t\t\t\t\t\t{isDragAccept && (\n\t\t\t\t\t\t\t\t\t\t<p className=\"dropzone__helper-text-bottom dropzone__helper-text-accepted\">\n\t\t\t\t\t\t\t\t\t\t\tDrop files to upload them\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t{isDragReject && (\n\t\t\t\t\t\t\t\t\t\t<p className=\"dropzone__helper-text-bottom dropzone__helper-text-rejected\">\n\t\t\t\t\t\t\t\t\t\t\t{error}\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t)}\n\t\t\t\t</ReactDropzone>\n\t\t\t</Fragment>\n\t\t)\n\t}\n}\n"],"file":"Dropzone.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState-story.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyState/EmptyState-story.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
+
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
|
|
9
|
+
var _lodash = require("lodash");
|
|
10
|
+
|
|
11
|
+
var _react2 = require("@storybook/react");
|
|
12
|
+
|
|
13
|
+
var _addonKnobs = require("@storybook/addon-knobs");
|
|
14
|
+
|
|
15
|
+
var _EmptyState = _interopRequireDefault(require("./EmptyState"));
|
|
16
|
+
|
|
17
|
+
var icons = _interopRequireWildcard(require("../../icons.js"));
|
|
18
|
+
|
|
19
|
+
var options = {};
|
|
20
|
+
(0, _lodash.each)((0, _lodash.keys)(icons), function (icon) {
|
|
21
|
+
options[icon] = icon;
|
|
22
|
+
});
|
|
23
|
+
var stories = (0, _react2.storiesOf)('EmptyState', module); // stories.addDecorator(
|
|
24
|
+
// withKnobsOptions({
|
|
25
|
+
// escapeHTML: false
|
|
26
|
+
// })
|
|
27
|
+
// )
|
|
28
|
+
|
|
29
|
+
stories.addDecorator(_addonKnobs.withKnobs);
|
|
30
|
+
stories.add('Default', function () {
|
|
31
|
+
return _react["default"].createElement(_EmptyState["default"], null);
|
|
32
|
+
});
|
|
33
|
+
stories.add('No matches', function () {
|
|
34
|
+
return _react["default"].createElement(_EmptyState["default"], {
|
|
35
|
+
icon: (0, _addonKnobs.select)('icon', options, 'no_matches'),
|
|
36
|
+
headline: (0, _addonKnobs.text)('headline', 'No matches found'),
|
|
37
|
+
primaryAction: (0, _addonKnobs.object)('primary button action', {
|
|
38
|
+
text: 'Show all',
|
|
39
|
+
onClick: function onClick() {},
|
|
40
|
+
type: 'submit'
|
|
41
|
+
}),
|
|
42
|
+
primaryActionButtonKind: (0, _addonKnobs.select)('primary button kind', ['primary', 'secondary', 'simple', 'caution'], 'simple'),
|
|
43
|
+
primaryActionButtonIcon: (0, _addonKnobs.select)('primary button icon', options, undefined)
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
stories.add('API Failure', function () {
|
|
47
|
+
return _react["default"].createElement(_EmptyState["default"], {
|
|
48
|
+
icon: (0, _addonKnobs.select)('icon', options, 'caution'),
|
|
49
|
+
headline: (0, _addonKnobs.text)('headline', 'Data not available'),
|
|
50
|
+
subheadline: (0, _addonKnobs.text)('subheadline', 'It looks like something went wrong.'),
|
|
51
|
+
primaryAction: (0, _addonKnobs.object)('primary button action', {
|
|
52
|
+
text: 'Try Again',
|
|
53
|
+
onClick: function onClick() {},
|
|
54
|
+
type: 'submit'
|
|
55
|
+
}),
|
|
56
|
+
primaryActionButtonKind: (0, _addonKnobs.select)('primary button kind', ['primary', 'secondary', 'simple', 'caution'], 'simple'),
|
|
57
|
+
primaryActionButtonIcon: (0, _addonKnobs.select)('primary button icon', options, undefined)
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
//# sourceMappingURL=EmptyState-story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/EmptyState/EmptyState-story.tsx"],"names":["options","icons","icon","stories","module","addDecorator","withKnobs","add","text","onClick","type","undefined"],"mappings":";;;;;;AAAA;;AACA;;AACA;;AACA;;AAOA;;AACA;;AAEA,IAAMA,OAAO,GAAG,EAAhB;AAEA,kBAAK,kBAAKC,KAAL,CAAL,EAAkB,UAAAC,IAAI,EAAI;AACzBF,EAAAA,OAAO,CAACE,IAAD,CAAP,GAAgBA,IAAhB;AACA,CAFD;AAIA,IAAMC,OAAO,GAAG,uBAAU,YAAV,EAAwBC,MAAxB,CAAhB,C,CAEA;AACA;AACA;AACA;AACA;;AACAD,OAAO,CAACE,YAAR,CAAqBC,qBAArB;AAEAH,OAAO,CAACI,GAAR,CAAY,SAAZ,EAAuB;AAAA,SAAM,gCAAC,sBAAD,OAAN;AAAA,CAAvB;AAEAJ,OAAO,CAACI,GAAR,CAAY,YAAZ,EAA0B;AAAA,SACzB,gCAAC,sBAAD;AACC,IAAA,IAAI,EAAE,wBAAO,MAAP,EAAeP,OAAf,EAAwB,YAAxB,CADP;AAEC,IAAA,QAAQ,EAAE,sBAAK,UAAL,EAAiB,kBAAjB,CAFX;AAGC,IAAA,aAAa,EAAE,wBAAO,uBAAP,EAAgC;AAC9CQ,MAAAA,IAAI,EAAE,UADwC;AAE9CC,MAAAA,OAAO,EAAE,mBAAM,CAAE,CAF6B;AAG9CC,MAAAA,IAAI,EAAE;AAHwC,KAAhC,CAHhB;AAQC,IAAA,uBAAuB,EAAE,wBACxB,qBADwB,EAExB,CAAC,SAAD,EAAY,WAAZ,EAAyB,QAAzB,EAAmC,SAAnC,CAFwB,EAGxB,QAHwB,CAR1B;AAaC,IAAA,uBAAuB,EAAE,wBAAO,qBAAP,EAA8BV,OAA9B,EAAuCW,SAAvC;AAb1B,IADyB;AAAA,CAA1B;AAkBAR,OAAO,CAACI,GAAR,CAAY,aAAZ,EAA2B;AAAA,SAC1B,gCAAC,sBAAD;AACC,IAAA,IAAI,EAAE,wBAAO,MAAP,EAAeP,OAAf,EAAwB,SAAxB,CADP;AAEC,IAAA,QAAQ,EAAE,sBAAK,UAAL,EAAiB,oBAAjB,CAFX;AAGC,IAAA,WAAW,EAAE,sBAAK,aAAL,EAAoB,qCAApB,CAHd;AAIC,IAAA,aAAa,EAAE,wBAAO,uBAAP,EAAgC;AAC9CQ,MAAAA,IAAI,EAAE,WADwC;AAE9CC,MAAAA,OAAO,EAAE,mBAAM,CAAE,CAF6B;AAG9CC,MAAAA,IAAI,EAAE;AAHwC,KAAhC,CAJhB;AASC,IAAA,uBAAuB,EAAE,wBACxB,qBADwB,EAExB,CAAC,SAAD,EAAY,WAAZ,EAAyB,QAAzB,EAAmC,SAAnC,CAFwB,EAGxB,QAHwB,CAT1B;AAcC,IAAA,uBAAuB,EAAE,wBAAO,qBAAP,EAA8BV,OAA9B,EAAuCW,SAAvC;AAd1B,IAD0B;AAAA,CAA3B","sourcesContent":["import React from 'react'\nimport { each, keys } from 'lodash'\nimport { storiesOf } from '@storybook/react'\nimport {\n\twithKnobs,\n\t// withKnobsOptions,\n\ttext,\n\tselect,\n\tobject\n} from '@storybook/addon-knobs'\nimport EmptyState from './EmptyState'\nimport * as icons from '../../icons.js'\n\nconst options = {}\n\neach(keys(icons), icon => {\n\toptions[icon] = icon\n})\n\nconst stories = storiesOf('EmptyState', module)\n\n// stories.addDecorator(\n// \twithKnobsOptions({\n// \t\tescapeHTML: false\n// \t})\n// )\nstories.addDecorator(withKnobs)\n\nstories.add('Default', () => <EmptyState />)\n\nstories.add('No matches', () => (\n\t<EmptyState\n\t\ticon={select('icon', options, 'no_matches')}\n\t\theadline={text('headline', 'No matches found')}\n\t\tprimaryAction={object('primary button action', {\n\t\t\ttext: 'Show all',\n\t\t\tonClick: () => {},\n\t\t\ttype: 'submit'\n\t\t})}\n\t\tprimaryActionButtonKind={select(\n\t\t\t'primary button kind',\n\t\t\t['primary', 'secondary', 'simple', 'caution'],\n\t\t\t'simple'\n\t\t)}\n\t\tprimaryActionButtonIcon={select('primary button icon', options, undefined)}\n\t/>\n))\n\nstories.add('API Failure', () => (\n\t<EmptyState\n\t\ticon={select('icon', options, 'caution')}\n\t\theadline={text('headline', 'Data not available')}\n\t\tsubheadline={text('subheadline', 'It looks like something went wrong.')}\n\t\tprimaryAction={object('primary button action', {\n\t\t\ttext: 'Try Again',\n\t\t\tonClick: () => {},\n\t\t\ttype: 'submit'\n\t\t})}\n\t\tprimaryActionButtonKind={select(\n\t\t\t'primary button kind',\n\t\t\t['primary', 'secondary', 'simple', 'caution'],\n\t\t\t'simple'\n\t\t)}\n\t\tprimaryActionButtonIcon={select('primary button icon', options, undefined)}\n\t/>\n))\n"],"file":"EmptyState-story.js"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface IEmptyStateProps {
|
|
3
|
+
/** Headline text to be displayed */
|
|
4
|
+
headline: string;
|
|
5
|
+
/** Subheadline text to be displayed (optional) */
|
|
6
|
+
subheadline?: string;
|
|
7
|
+
/** Primary icon to be displayed above the headline (optional) */
|
|
8
|
+
icon?: string;
|
|
9
|
+
/** Primary icon as line art (optional) */
|
|
10
|
+
isLineIcon?: boolean;
|
|
11
|
+
/** Primary action in the footer (optional) */
|
|
12
|
+
primaryAction?: any;
|
|
13
|
+
/** Primary action in the footer (optional) */
|
|
14
|
+
primaryActionButtonKind?: string;
|
|
15
|
+
/** Primary action in the footer (optional) */
|
|
16
|
+
primaryActionButtonIcon?: string;
|
|
17
|
+
}
|
|
18
|
+
declare const EmptyState: {
|
|
19
|
+
(props: IEmptyStateProps): React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
|
|
20
|
+
defaultProps: {
|
|
21
|
+
icon: string;
|
|
22
|
+
headline: string;
|
|
23
|
+
isLineIcon: boolean;
|
|
24
|
+
primaryActionButtonKind: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export default EmptyState;
|
|
28
|
+
//# sourceMappingURL=EmptyState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyState/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,WAAW,gBAAgB;IAChC,oCAAoC;IACpC,QAAQ,EAAE,MAAM,CAAA;IAEhB,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,iEAAiE;IACjE,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,0CAA0C;IAC1C,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB,8CAA8C;IAE9C,aAAa,CAAC,EAAE,GAAG,CAAA;IAEnB,8CAA8C;IAC9C,uBAAuB,CAAC,EAAE,MAAM,CAAA;IAEhC,8CAA8C;IAC9C,uBAAuB,CAAC,EAAE,MAAM,CAAA;CAChC;AAED,QAAA,MAAM,UAAU;;;;;;;;CAmCf,CAAA;AASD,eAAe,UAAU,CAAA"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
|
+
|
|
14
|
+
var _Icon = _interopRequireDefault(require("../Icon/Icon"));
|
|
15
|
+
|
|
16
|
+
var _Button = _interopRequireDefault(require("../Button/Button"));
|
|
17
|
+
|
|
18
|
+
var EmptyState = function EmptyState(props) {
|
|
19
|
+
var headline = props.headline,
|
|
20
|
+
subheadline = props.subheadline,
|
|
21
|
+
icon = props.icon,
|
|
22
|
+
isLineIcon = props.isLineIcon,
|
|
23
|
+
primaryAction = props.primaryAction,
|
|
24
|
+
primaryActionButtonKind = props.primaryActionButtonKind,
|
|
25
|
+
primaryActionButtonIcon = props.primaryActionButtonIcon;
|
|
26
|
+
return _react["default"].createElement("div", {
|
|
27
|
+
className: "empty-state"
|
|
28
|
+
}, icon && _react["default"].createElement("span", {
|
|
29
|
+
className: "empty-state__icon"
|
|
30
|
+
}, _react["default"].createElement(_Icon["default"], {
|
|
31
|
+
name: icon,
|
|
32
|
+
isLineIcon: isLineIcon
|
|
33
|
+
})), _react["default"].createElement("h3", {
|
|
34
|
+
className: "empty-state__headline"
|
|
35
|
+
}, headline), subheadline && _react["default"].createElement("div", {
|
|
36
|
+
className: "empty-state__subheadline"
|
|
37
|
+
}, subheadline), primaryAction && _react["default"].createElement(_Button["default"], (0, _extends2["default"])({
|
|
38
|
+
icon: primaryActionButtonIcon ? {
|
|
39
|
+
name: primaryActionButtonIcon,
|
|
40
|
+
className: "btn__line-icon"
|
|
41
|
+
} : null,
|
|
42
|
+
kind: primaryActionButtonKind
|
|
43
|
+
}, primaryAction)));
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
EmptyState.defaultProps = {
|
|
47
|
+
icon: 'empty_box',
|
|
48
|
+
headline: 'Nothing to see here',
|
|
49
|
+
isLineIcon: true,
|
|
50
|
+
primaryActionButtonKind: 'simple'
|
|
51
|
+
};
|
|
52
|
+
var _default = EmptyState;
|
|
53
|
+
exports["default"] = _default;
|
|
54
|
+
//# sourceMappingURL=EmptyState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/EmptyState/EmptyState.tsx"],"names":["EmptyState","props","headline","subheadline","icon","isLineIcon","primaryAction","primaryActionButtonKind","primaryActionButtonIcon","name","className","defaultProps"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AACA;;AAyBA,IAAMA,UAAU,GAAG,SAAbA,UAAa,CAACC,KAAD,EAAiD;AAAA,MAElEC,QAFkE,GAS/DD,KAT+D,CAElEC,QAFkE;AAAA,MAGlEC,WAHkE,GAS/DF,KAT+D,CAGlEE,WAHkE;AAAA,MAIlEC,IAJkE,GAS/DH,KAT+D,CAIlEG,IAJkE;AAAA,MAKlEC,UALkE,GAS/DJ,KAT+D,CAKlEI,UALkE;AAAA,MAMlEC,aANkE,GAS/DL,KAT+D,CAMlEK,aANkE;AAAA,MAOlEC,uBAPkE,GAS/DN,KAT+D,CAOlEM,uBAPkE;AAAA,MAQlEC,uBARkE,GAS/DP,KAT+D,CAQlEO,uBARkE;AAWnE,SACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACEJ,IAAI,IACJ;AAAM,IAAA,SAAS,EAAC;AAAhB,KACC,gCAAC,gBAAD;AAAM,IAAA,IAAI,EAAEA,IAAZ;AAAkB,IAAA,UAAU,EAAEC;AAA9B,IADD,CAFF,EAMC;AAAI,IAAA,SAAS,EAAC;AAAd,KAAuCH,QAAvC,CAND,EAOEC,WAAW,IACX;AAAK,IAAA,SAAS,EAAC;AAAf,KAA2CA,WAA3C,CARF,EAUEG,aAAa,IACb,gCAAC,kBAAD;AACC,IAAA,IAAI,EACHE,uBAAuB,GACpB;AAAEC,MAAAA,IAAI,EAAED,uBAAR;AAAiCE,MAAAA,SAAS;AAA1C,KADoB,GAEpB,IAJL;AAMC,IAAA,IAAI,EAAEH;AANP,KAOKD,aAPL,EAXF,CADD;AAwBA,CAnCD;;AAqCAN,UAAU,CAACW,YAAX,GAA0B;AACzBP,EAAAA,IAAI,EAAE,WADmB;AAEzBF,EAAAA,QAAQ,EAAE,qBAFe;AAGzBG,EAAAA,UAAU,EAAE,IAHa;AAIzBE,EAAAA,uBAAuB,EAAE;AAJA,CAA1B;eAOeP,U","sourcesContent":["import React from 'react'\nimport Icon from '../Icon/Icon'\nimport Button from '../Button/Button'\n\nexport interface IEmptyStateProps {\n\t/** Headline text to be displayed */\n\theadline: string\n\n\t/** Subheadline text to be displayed (optional) */\n\tsubheadline?: string\n\t/** Primary icon to be displayed above the headline (optional) */\n\ticon?: string\n\n\t/** Primary icon as line art (optional) */\n\tisLineIcon?: boolean\n\n\t/** Primary action in the footer (optional) */\n\t// TODO: Import button props once it's converted to tsx\n\tprimaryAction?: any\n\n\t/** Primary action in the footer (optional) */\n\tprimaryActionButtonKind?: string\n\n\t/** Primary action in the footer (optional) */\n\tprimaryActionButtonIcon?: string\n}\n\nconst EmptyState = (props: IEmptyStateProps): React.ReactElement => {\n\tconst {\n\t\theadline,\n\t\tsubheadline,\n\t\ticon,\n\t\tisLineIcon,\n\t\tprimaryAction,\n\t\tprimaryActionButtonKind,\n\t\tprimaryActionButtonIcon\n\t} = props\n\n\treturn (\n\t\t<div className=\"empty-state\">\n\t\t\t{icon && (\n\t\t\t\t<span className=\"empty-state__icon\">\n\t\t\t\t\t<Icon name={icon} isLineIcon={isLineIcon} />\n\t\t\t\t</span>\n\t\t\t)}\n\t\t\t<h3 className=\"empty-state__headline\">{headline}</h3>\n\t\t\t{subheadline && (\n\t\t\t\t<div className=\"empty-state__subheadline\">{subheadline}</div>\n\t\t\t)}\n\t\t\t{primaryAction && (\n\t\t\t\t<Button\n\t\t\t\t\ticon={\n\t\t\t\t\t\tprimaryActionButtonIcon\n\t\t\t\t\t\t\t? { name: primaryActionButtonIcon, className: `btn__line-icon` }\n\t\t\t\t\t\t\t: null\n\t\t\t\t\t}\n\t\t\t\t\tkind={primaryActionButtonKind}\n\t\t\t\t\t{...primaryAction}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\n\t)\n}\n\nEmptyState.defaultProps = {\n\ticon: 'empty_box',\n\theadline: 'Nothing to see here',\n\tisLineIcon: true,\n\tprimaryActionButtonKind: 'simple'\n}\n\nexport default EmptyState\n"],"file":"EmptyState.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventDetails-story.d.ts","sourceRoot":"","sources":["../../../src/components/EventDetails/EventDetails-story.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
6
|
+
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
|
|
9
|
+
var _react2 = require("@storybook/react");
|
|
10
|
+
|
|
11
|
+
var _EventDetails = _interopRequireDefault(require("./EventDetails"));
|
|
12
|
+
|
|
13
|
+
var _Core = require("../Core");
|
|
14
|
+
|
|
15
|
+
var _eventDetailsMock = require("./eventDetailsMock");
|
|
16
|
+
|
|
17
|
+
var _addonKnobs = require("@storybook/addon-knobs");
|
|
18
|
+
|
|
19
|
+
// import Page from '../Page'
|
|
20
|
+
var stories = (0, _react2.storiesOf)('EventDetails', module); // TODO: Turn off this decorator for specs. It obfuscates prop tables.
|
|
21
|
+
// stories.addDecorator(storyFn => (
|
|
22
|
+
// <Page STORYBOOKwrap={false} sidebar={storyFn()} />
|
|
23
|
+
// ))
|
|
24
|
+
|
|
25
|
+
stories.addDecorator(_addonKnobs.withKnobs);
|
|
26
|
+
stories.add('Booking: Appointment', function () {
|
|
27
|
+
return _react["default"].createElement(_Core.Sidebar, {
|
|
28
|
+
side: "right",
|
|
29
|
+
isCollapsible: false,
|
|
30
|
+
isLarge: true
|
|
31
|
+
}, _react["default"].createElement(_Core.SidebarHeader, {
|
|
32
|
+
title: "Appointment details",
|
|
33
|
+
onClose: function onClose() {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
}), _react["default"].createElement(_EventDetails["default"], (0, _extends2["default"])({
|
|
37
|
+
isLoading: (0, _addonKnobs["boolean"])('isLoading', false)
|
|
38
|
+
}, _eventDetailsMock.appointment, {
|
|
39
|
+
onAction: function onAction(action) {
|
|
40
|
+
console.log(JSON.stringify(action.payload));
|
|
41
|
+
}
|
|
42
|
+
})));
|
|
43
|
+
}).add('Booking: Appointment has warning', function () {
|
|
44
|
+
return _react["default"].createElement(_Core.Sidebar, {
|
|
45
|
+
side: "right",
|
|
46
|
+
isCollapsible: false,
|
|
47
|
+
isLarge: true
|
|
48
|
+
}, _react["default"].createElement(_Core.SidebarHeader, {
|
|
49
|
+
title: "Appointment details",
|
|
50
|
+
onClose: function onClose() {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
}), _react["default"].createElement(_EventDetails["default"], (0, _extends2["default"])({
|
|
54
|
+
isLoading: (0, _addonKnobs["boolean"])('isLoading', false)
|
|
55
|
+
}, _eventDetailsMock.warningAppointment, {
|
|
56
|
+
onAction: function onAction(action) {
|
|
57
|
+
console.log(JSON.stringify(action.payload));
|
|
58
|
+
}
|
|
59
|
+
})));
|
|
60
|
+
}).add('Booking: Past Appointment', function () {
|
|
61
|
+
return _react["default"].createElement(_Core.Sidebar, {
|
|
62
|
+
side: "right",
|
|
63
|
+
isCollapsible: false,
|
|
64
|
+
isLarge: true
|
|
65
|
+
}, _react["default"].createElement(_Core.SidebarHeader, {
|
|
66
|
+
title: "Appointment details",
|
|
67
|
+
onClose: function onClose() {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
}), _react["default"].createElement(_EventDetails["default"], (0, _extends2["default"])({
|
|
71
|
+
isLoading: (0, _addonKnobs["boolean"])('isLoading', false)
|
|
72
|
+
}, _eventDetailsMock.pastAppointment, {
|
|
73
|
+
onAction: function onAction(action) {
|
|
74
|
+
console.log(JSON.stringify(action.payload));
|
|
75
|
+
}
|
|
76
|
+
})));
|
|
77
|
+
}).add('Scheduling: Lunch Break', function () {
|
|
78
|
+
return _react["default"].createElement(_Core.Sidebar, {
|
|
79
|
+
side: "right",
|
|
80
|
+
isCollapsible: false,
|
|
81
|
+
isLarge: true
|
|
82
|
+
}, _react["default"].createElement(_Core.SidebarHeader, {
|
|
83
|
+
title: "Lunch break",
|
|
84
|
+
onClose: function onClose() {
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
}), _react["default"].createElement(_EventDetails["default"], (0, _extends2["default"])({
|
|
88
|
+
isLoading: (0, _addonKnobs["boolean"])('isLoading', false)
|
|
89
|
+
}, _eventDetailsMock.lunchBreak, {
|
|
90
|
+
onAction: function onAction(action) {
|
|
91
|
+
console.log(JSON.stringify(action.payload));
|
|
92
|
+
}
|
|
93
|
+
})));
|
|
94
|
+
}).add('Scheduling: PTO', function () {
|
|
95
|
+
return _react["default"].createElement(_Core.Sidebar, {
|
|
96
|
+
side: "right",
|
|
97
|
+
isCollapsible: false,
|
|
98
|
+
isLarge: true
|
|
99
|
+
}, _react["default"].createElement(_Core.SidebarHeader, {
|
|
100
|
+
title: "PTO",
|
|
101
|
+
onClose: function onClose() {
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
104
|
+
}), _react["default"].createElement(_EventDetails["default"], (0, _extends2["default"])({
|
|
105
|
+
isLoading: (0, _addonKnobs["boolean"])('isLoading', false)
|
|
106
|
+
}, _eventDetailsMock.ptoBlock, {
|
|
107
|
+
onAction: function onAction(action) {
|
|
108
|
+
console.log(JSON.stringify(action.payload));
|
|
109
|
+
}
|
|
110
|
+
})));
|
|
111
|
+
});
|
|
112
|
+
//# sourceMappingURL=EventDetails-story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/EventDetails/EventDetails-story.tsx"],"names":["stories","module","addDecorator","withKnobs","add","appointment","action","console","log","JSON","stringify","payload","warningAppointment","pastAppointment","lunchBreak","ptoBlock"],"mappings":"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","sourcesContent":["import React from 'react'\nimport { storiesOf } from '@storybook/react'\n\nimport EventDetails from './EventDetails'\n\nimport { Sidebar, SidebarHeader } from '../Core'\n// import Page from '../Page'\n\nimport {\n\tappointment,\n\twarningAppointment,\n\tpastAppointment,\n\tlunchBreak,\n\tptoBlock\n} from './eventDetailsMock'\nimport { boolean, withKnobs } from '@storybook/addon-knobs'\n\nconst stories = storiesOf('EventDetails', module)\n\n// TODO: Turn off this decorator for specs. It obfuscates prop tables.\n// stories.addDecorator(storyFn => (\n// \t<Page STORYBOOKwrap={false} sidebar={storyFn()} />\n// ))\n\nstories.addDecorator(withKnobs)\n\nstories\n\t.add('Booking: Appointment', () => (\n\t\t<Sidebar side=\"right\" isCollapsible={false} isLarge>\n\t\t\t<SidebarHeader title=\"Appointment details\" onClose={() => null} />\n\t\t\t<EventDetails\n\t\t\t\tisLoading={boolean('isLoading', false)}\n\t\t\t\t{...appointment}\n\t\t\t\tonAction={action => {\n\t\t\t\t\tconsole.log(JSON.stringify(action.payload))\n\t\t\t\t}}\n\t\t\t/>\n\t\t</Sidebar>\n\t))\n\t.add('Booking: Appointment has warning', () => (\n\t\t<Sidebar side=\"right\" isCollapsible={false} isLarge>\n\t\t\t<SidebarHeader title=\"Appointment details\" onClose={() => null} />\n\t\t\t<EventDetails\n\t\t\t\tisLoading={boolean('isLoading', false)}\n\t\t\t\t{...warningAppointment}\n\t\t\t\tonAction={action => {\n\t\t\t\t\tconsole.log(JSON.stringify(action.payload))\n\t\t\t\t}}\n\t\t\t/>\n\t\t</Sidebar>\n\t))\n\t.add('Booking: Past Appointment', () => (\n\t\t<Sidebar side=\"right\" isCollapsible={false} isLarge>\n\t\t\t<SidebarHeader title=\"Appointment details\" onClose={() => null} />\n\t\t\t<EventDetails\n\t\t\t\tisLoading={boolean('isLoading', false)}\n\t\t\t\t{...pastAppointment}\n\t\t\t\tonAction={action => {\n\t\t\t\t\tconsole.log(JSON.stringify(action.payload))\n\t\t\t\t}}\n\t\t\t/>\n\t\t</Sidebar>\n\t))\n\t.add('Scheduling: Lunch Break', () => (\n\t\t<Sidebar side=\"right\" isCollapsible={false} isLarge>\n\t\t\t<SidebarHeader title=\"Lunch break\" onClose={() => null} />\n\t\t\t<EventDetails\n\t\t\t\tisLoading={boolean('isLoading', false)}\n\t\t\t\t{...lunchBreak}\n\t\t\t\tonAction={action => {\n\t\t\t\t\tconsole.log(JSON.stringify(action.payload))\n\t\t\t\t}}\n\t\t\t/>\n\t\t</Sidebar>\n\t))\n\n\t.add('Scheduling: PTO', () => (\n\t\t<Sidebar side=\"right\" isCollapsible={false} isLarge>\n\t\t\t<SidebarHeader title=\"PTO\" onClose={() => null} />\n\t\t\t<EventDetails\n\t\t\t\tisLoading={boolean('isLoading', false)}\n\t\t\t\t{...ptoBlock}\n\t\t\t\tonAction={action => {\n\t\t\t\t\tconsole.log(JSON.stringify(action.payload))\n\t\t\t\t}}\n\t\t\t/>\n\t\t</Sidebar>\n\t))\n"],"file":"EventDetails-story.js"}
|