@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,86 @@
|
|
|
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 _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
+
|
|
14
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
15
|
+
|
|
16
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
17
|
+
|
|
18
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
19
|
+
|
|
20
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
21
|
+
|
|
22
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
23
|
+
|
|
24
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
25
|
+
|
|
26
|
+
var _react = _interopRequireDefault(require("react"));
|
|
27
|
+
|
|
28
|
+
var _reactModal = _interopRequireDefault(require("react-modal"));
|
|
29
|
+
|
|
30
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
31
|
+
|
|
32
|
+
var _ModalHeader = _interopRequireDefault(require("./components/ModalHeader/ModalHeader"));
|
|
33
|
+
|
|
34
|
+
var _ModalBody = _interopRequireDefault(require("./components/ModalBody/ModalBody"));
|
|
35
|
+
|
|
36
|
+
var _ModalFooter = _interopRequireDefault(require("./components/ModalFooter/ModalFooter"));
|
|
37
|
+
|
|
38
|
+
var Modal =
|
|
39
|
+
/*#__PURE__*/
|
|
40
|
+
function (_React$PureComponent) {
|
|
41
|
+
(0, _inherits2["default"])(Modal, _React$PureComponent);
|
|
42
|
+
|
|
43
|
+
function Modal() {
|
|
44
|
+
(0, _classCallCheck2["default"])(this, Modal);
|
|
45
|
+
return (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(Modal).apply(this, arguments));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
(0, _createClass2["default"])(Modal, [{
|
|
49
|
+
key: "render",
|
|
50
|
+
value: function render() {
|
|
51
|
+
var _this$props = this.props,
|
|
52
|
+
isOpen = _this$props.isOpen,
|
|
53
|
+
size = _this$props.size,
|
|
54
|
+
isFullHeight = _this$props.isFullHeight,
|
|
55
|
+
className = _this$props.className,
|
|
56
|
+
rest = (0, _objectWithoutProperties2["default"])(_this$props, ["isOpen", "size", "isFullHeight", "className"]);
|
|
57
|
+
var modalClassName = (0, _classnames["default"])('modal', className, {
|
|
58
|
+
'modal-small': size === 'small',
|
|
59
|
+
'modal-medium': size === 'medium',
|
|
60
|
+
'modal-full-height': isFullHeight
|
|
61
|
+
});
|
|
62
|
+
return _react["default"].createElement(_reactModal["default"], (0, _extends2["default"])({
|
|
63
|
+
isOpen: isOpen,
|
|
64
|
+
overlayClassName: "modal-overlay",
|
|
65
|
+
className: modalClassName
|
|
66
|
+
}, rest));
|
|
67
|
+
}
|
|
68
|
+
}]);
|
|
69
|
+
return Modal;
|
|
70
|
+
}(_react["default"].PureComponent);
|
|
71
|
+
|
|
72
|
+
exports["default"] = Modal;
|
|
73
|
+
(0, _defineProperty2["default"])(Modal, "defaultProps", {
|
|
74
|
+
isFullHeight: false
|
|
75
|
+
});
|
|
76
|
+
(0, _defineProperty2["default"])(Modal, "setAppElement", function (selector) {
|
|
77
|
+
_reactModal["default"].setAppElement(selector);
|
|
78
|
+
});
|
|
79
|
+
(0, _defineProperty2["default"])(Modal, "Header", _ModalHeader["default"]);
|
|
80
|
+
(0, _defineProperty2["default"])(Modal, "Body", _ModalBody["default"]);
|
|
81
|
+
(0, _defineProperty2["default"])(Modal, "Footer", _ModalFooter["default"]);
|
|
82
|
+
(0, _defineProperty2["default"])(Modal, "defaultProps", {
|
|
83
|
+
size: 'small',
|
|
84
|
+
isOpen: false
|
|
85
|
+
});
|
|
86
|
+
//# sourceMappingURL=Modal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Modal/Modal.js"],"names":["Modal","props","isOpen","size","isFullHeight","className","rest","modalClassName","React","PureComponent","selector","ReactModal","setAppElement","ModalHeader","ModalBody","ModalFooter"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;IAkBqBA,K;;;;;;;;;;;;6BAiBX;AAAA,wBACmD,KAAKC,KADxD;AAAA,UACAC,MADA,eACAA,MADA;AAAA,UACQC,IADR,eACQA,IADR;AAAA,UACcC,YADd,eACcA,YADd;AAAA,UAC4BC,SAD5B,eAC4BA,SAD5B;AAAA,UAC0CC,IAD1C;AAER,UAAMC,cAAc,GAAG,4BAAG,OAAH,EAAYF,SAAZ,EAAuB;AAC7C,uBAAeF,IAAI,KAAK,OADqB;AAE7C,wBAAgBA,IAAI,KAAK,QAFoB;AAG7C,6BAAqBC;AAHwB,OAAvB,CAAvB;AAKA,aACC,gCAAC,sBAAD;AACC,QAAA,MAAM,EAAEF,MADT;AAEC,QAAA,gBAAgB,EAAC,eAFlB;AAGC,QAAA,SAAS,EAAEK;AAHZ,SAIKD,IAJL,EADD;AAQA;;;EAhCiCE,kBAAMC,a;;;iCAApBT,K,kBACE;AACrBI,EAAAA,YAAY,EAAE;AADO,C;iCADFJ,K,mBAKG,UAACU,QAAD,EAAsB;AAC5CC,yBAAWC,aAAX,CAAyBF,QAAzB;AACA,C;iCAPmBV,K,YASJa,uB;iCATIb,K,UAUNc,qB;iCAVMd,K,YAWJe,uB;iCAXIf,K,kBAYE;AACrBG,EAAAA,IAAI,EAAE,OADe;AAErBD,EAAAA,MAAM,EAAE;AAFa,C","sourcesContent":["// @flow\nimport React from 'react'\nimport ReactModal from 'react-modal'\nimport cx from 'classnames'\nimport ModalHeader from './components/ModalHeader/ModalHeader'\nimport ModalBody from './components/ModalBody/ModalBody'\nimport ModalFooter from './components/ModalFooter/ModalFooter'\n\nexport type Props = {\n\t/** Set true to show the modal */\n\tisOpen: boolean,\n\n\t/** Should the modal stretch to its maximum height whatever the content? */\n\tisFullHeight?: boolean,\n\n\t/** Size of the modal */\n\tsize: 'small' | 'medium' | 'full-width',\n\n\t/** Optional class name */\n\tclassName?: string\n}\n\ntype State = {}\n\nexport default class Modal extends React.PureComponent<Props, State> {\n\tstatic defaultProps = {\n\t\tisFullHeight: false\n\t}\n\n\tstatic setAppElement = (selector: string) => {\n\t\tReactModal.setAppElement(selector)\n\t}\n\n\tstatic Header = ModalHeader\n\tstatic Body = ModalBody\n\tstatic Footer = ModalFooter\n\tstatic defaultProps = {\n\t\tsize: 'small',\n\t\tisOpen: false\n\t}\n\n\trender() {\n\t\tconst { isOpen, size, isFullHeight, className, ...rest } = this.props\n\t\tconst modalClassName = cx('modal', className, {\n\t\t\t'modal-small': size === 'small',\n\t\t\t'modal-medium': size === 'medium',\n\t\t\t'modal-full-height': isFullHeight\n\t\t})\n\t\treturn (\n\t\t\t<ReactModal\n\t\t\t\tisOpen={isOpen}\n\t\t\t\toverlayClassName=\"modal-overlay\"\n\t\t\t\tclassName={modalClassName}\n\t\t\t\t{...rest}\n\t\t\t/>\n\t\t)\n\t}\n}\n"],"file":"Modal.js"}
|
|
@@ -0,0 +1,30 @@
|
|
|
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 _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread"));
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
|
+
|
|
14
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
+
|
|
16
|
+
var ModalBody = function ModalBody(props) {
|
|
17
|
+
return _react["default"].createElement("div", {
|
|
18
|
+
className: (0, _classnames["default"])('modal-body', {
|
|
19
|
+
'modal-body--full-bleed': props.fullBleed
|
|
20
|
+
}, props.className),
|
|
21
|
+
style: (0, _objectSpread2["default"])({}, props.height ? {
|
|
22
|
+
height: props.height
|
|
23
|
+
} : {})
|
|
24
|
+
}, props.children);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
ModalBody.displayName = 'Modal.Body';
|
|
28
|
+
var _default = ModalBody;
|
|
29
|
+
exports["default"] = _default;
|
|
30
|
+
//# sourceMappingURL=ModalBody.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/Modal/components/ModalBody/ModalBody.js"],"names":["ModalBody","props","fullBleed","className","height","children","displayName"],"mappings":";;;;;;;;;;;AACA;;AAEA;;AAgBA,IAAMA,SAAS,GAAG,SAAZA,SAAY,CAACC,KAAD;AAAA,SACjB;AACC,IAAA,SAAS,EAAE,4BACV,YADU,EAEV;AACC,gCAA0BA,KAAK,CAACC;AADjC,KAFU,EAKVD,KAAK,CAACE,SALI,CADZ;AAQC,IAAA,KAAK,qCAAQF,KAAK,CAACG,MAAN,GAAe;AAAEA,MAAAA,MAAM,EAAEH,KAAK,CAACG;AAAhB,KAAf,GAA0C,EAAlD;AARN,KAUEH,KAAK,CAACI,QAVR,CADiB;AAAA,CAAlB;;AAeAL,SAAS,CAACM,WAAV,GAAwB,YAAxB;eACeN,S","sourcesContent":["// @flow\nimport React from 'react'\nimport type { Node } from 'react'\nimport cx from 'classnames'\n\ntype Props = {\n\t/** Modal children */\n\tchildren: Node,\n\n\t/** Optional class name */\n\tclassName?: string,\n\n\t/** Should the content go to the edge of the modal body? */\n\tfullBleed?: boolean,\n\n\t/** Optional height of body */\n\theight?: string\n}\n\nconst ModalBody = (props: Props) => (\n\t<div\n\t\tclassName={cx(\n\t\t\t'modal-body',\n\t\t\t{\n\t\t\t\t'modal-body--full-bleed': props.fullBleed\n\t\t\t},\n\t\t\tprops.className\n\t\t)}\n\t\tstyle={{ ...(props.height ? { height: props.height } : {}) }}\n\t>\n\t\t{props.children}\n\t</div>\n)\n\nModalBody.displayName = 'Modal.Body'\nexport default ModalBody\n"],"file":"ModalBody.js"}
|
|
@@ -0,0 +1,31 @@
|
|
|
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 _Button = _interopRequireDefault(require("../../../Button/Button"));
|
|
15
|
+
|
|
16
|
+
var ModalFooter = function ModalFooter(props) {
|
|
17
|
+
var primaryAction = props.primaryAction,
|
|
18
|
+
secondaryAction = props.secondaryAction;
|
|
19
|
+
return _react["default"].createElement("div", {
|
|
20
|
+
className: "modal-footer"
|
|
21
|
+
}, _react["default"].createElement(_Button["default"], (0, _extends2["default"])({
|
|
22
|
+
kind: "primary"
|
|
23
|
+
}, primaryAction)), secondaryAction && _react["default"].createElement(_Button["default"], (0, _extends2["default"])({
|
|
24
|
+
kind: "secondary"
|
|
25
|
+
}, secondaryAction)));
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
ModalFooter.displayName = 'Modal.Footer';
|
|
29
|
+
var _default = ModalFooter;
|
|
30
|
+
exports["default"] = _default;
|
|
31
|
+
//# sourceMappingURL=ModalFooter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/Modal/components/ModalFooter/ModalFooter.js"],"names":["ModalFooter","props","primaryAction","secondaryAction","displayName"],"mappings":";;;;;;;;;;;AACA;;AACA;;AAWA,IAAMA,WAAW,GAAG,SAAdA,WAAc,CAACC,KAAD,EAAkB;AAAA,MAC7BC,aAD6B,GACMD,KADN,CAC7BC,aAD6B;AAAA,MACdC,eADc,GACMF,KADN,CACdE,eADc;AAErC,SACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC,gCAAC,kBAAD;AAAQ,IAAA,IAAI,EAAC;AAAb,KAA2BD,aAA3B,EADD,EAEEC,eAAe,IAAI,gCAAC,kBAAD;AAAQ,IAAA,IAAI,EAAC;AAAb,KAA6BA,eAA7B,EAFrB,CADD;AAMA,CARD;;AAUAH,WAAW,CAACI,WAAZ,GAA0B,cAA1B;eACeJ,W","sourcesContent":["// @flow\nimport React from 'react'\nimport Button from '../../../Button/Button'\nimport type { Props as ButtonProps } from '../../../Button/Button'\n\nexport type Props = {\n\t/** The primary action in the footer */\n\tprimaryAction: ButtonProps,\n\n\t/** Optional secondary action */\n\tsecondaryAction?: ButtonProps\n}\n\nconst ModalFooter = (props: Props) => {\n\tconst { primaryAction, secondaryAction } = props\n\treturn (\n\t\t<div className=\"modal-footer\">\n\t\t\t<Button kind=\"primary\" {...primaryAction} />\n\t\t\t{secondaryAction && <Button kind=\"secondary\" {...secondaryAction} />}\n\t\t</div>\n\t)\n}\n\nModalFooter.displayName = 'Modal.Footer'\nexport default ModalFooter\n"],"file":"ModalFooter.js"}
|
|
@@ -0,0 +1,84 @@
|
|
|
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 _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _Button = _interopRequireDefault(require("../../../Button/Button"));
|
|
15
|
+
|
|
16
|
+
var ArrowBack = function ArrowBack(props) {
|
|
17
|
+
return _react["default"].createElement("svg", props, _react["default"].createElement("path", {
|
|
18
|
+
fillRule: "evenodd",
|
|
19
|
+
clipRule: "evenodd",
|
|
20
|
+
d: "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"
|
|
21
|
+
}));
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
ArrowBack.defaultProps = {
|
|
25
|
+
width: "24",
|
|
26
|
+
height: "24",
|
|
27
|
+
viewBox: "0 0 24 24",
|
|
28
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
var CloseIcon = function CloseIcon(props) {
|
|
32
|
+
return _react["default"].createElement("svg", props, _react["default"].createElement("path", {
|
|
33
|
+
fillRule: "evenodd",
|
|
34
|
+
clipRule: "evenodd",
|
|
35
|
+
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
36
|
+
}));
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
CloseIcon.defaultProps = {
|
|
40
|
+
width: "24",
|
|
41
|
+
height: "24",
|
|
42
|
+
viewBox: "0 0 24 24",
|
|
43
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
var ModalHeader = function ModalHeader(props) {
|
|
47
|
+
var title = props.title,
|
|
48
|
+
onRequestClose = props.onRequestClose,
|
|
49
|
+
isPaginated = props.isPaginated,
|
|
50
|
+
onClickBack = props.onClickBack;
|
|
51
|
+
return _react["default"].createElement("div", {
|
|
52
|
+
className: (0, _classnames["default"])('modal-header', {
|
|
53
|
+
'modal-header--is-paginated': isPaginated
|
|
54
|
+
})
|
|
55
|
+
}, _react["default"].createElement("div", {
|
|
56
|
+
className: "modal-header__title-wrapper"
|
|
57
|
+
}, isPaginated && _react["default"].createElement(_Button["default"], {
|
|
58
|
+
isSmall: true,
|
|
59
|
+
className: (0, _classnames["default"])('modal-header__back-btn', {
|
|
60
|
+
'modal-header__back-btn--is-hidden': !onClickBack
|
|
61
|
+
}),
|
|
62
|
+
icon: {
|
|
63
|
+
customIcon: ArrowBack
|
|
64
|
+
},
|
|
65
|
+
disabled: !onClickBack,
|
|
66
|
+
onClick: onClickBack
|
|
67
|
+
}), _react["default"].createElement("h2", {
|
|
68
|
+
className: "modal-header__title"
|
|
69
|
+
}, title)), _react["default"].createElement(_Button["default"], {
|
|
70
|
+
isSmall: true,
|
|
71
|
+
icon: {
|
|
72
|
+
customIcon: CloseIcon
|
|
73
|
+
},
|
|
74
|
+
onClick: onRequestClose
|
|
75
|
+
}));
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
ModalHeader.displayName = 'Modal.Header';
|
|
79
|
+
ModalHeader.defaultProps = {
|
|
80
|
+
isPaginated: false
|
|
81
|
+
};
|
|
82
|
+
var _default = ModalHeader;
|
|
83
|
+
exports["default"] = _default;
|
|
84
|
+
//# sourceMappingURL=ModalHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/Modal/components/ModalHeader/ModalHeader.js"],"names":["ArrowBack","CloseIcon","ModalHeader","props","title","onRequestClose","isPaginated","onClickBack","customIcon","displayName","defaultProps"],"mappings":";;;;;;;;;AACA;;AACA;;AACA;;IACOA,S,YAAAA,S;;;;;;;;AAAAA,S;;;;;;;IACAC,S,YAAAA,S;;;;;;;;AAAAA,S;;;;;;;AAgBP,IAAMC,WAAW,GAAG,SAAdA,WAAc,CAACC,KAAD,EAAkB;AAAA,MAC7BC,KAD6B,GACuBD,KADvB,CAC7BC,KAD6B;AAAA,MACtBC,cADsB,GACuBF,KADvB,CACtBE,cADsB;AAAA,MACNC,WADM,GACuBH,KADvB,CACNG,WADM;AAAA,MACOC,WADP,GACuBJ,KADvB,CACOI,WADP;AAGrC,SACC;AACC,IAAA,SAAS,EAAE,4BAAG,cAAH,EAAmB;AAC7B,oCAA8BD;AADD,KAAnB;AADZ,KAKC;AAAK,IAAA,SAAS,EAAC;AAAf,KACEA,WAAW,IACX,gCAAC,kBAAD;AACC,IAAA,OAAO,MADR;AAEC,IAAA,SAAS,EAAE,4BAAG,wBAAH,EAA6B;AACvC,2CAAqC,CAACC;AADC,KAA7B,CAFZ;AAKC,IAAA,IAAI,EAAE;AAAEC,MAAAA,UAAU,EAAER;AAAd,KALP;AAMC,IAAA,QAAQ,EAAE,CAACO,WANZ;AAOC,IAAA,OAAO,EAAEA;AAPV,IAFF,EAYC;AAAI,IAAA,SAAS,EAAC;AAAd,KAAqCH,KAArC,CAZD,CALD,EAmBC,gCAAC,kBAAD;AACC,IAAA,OAAO,MADR;AAEC,IAAA,IAAI,EAAE;AAAEI,MAAAA,UAAU,EAAEP;AAAd,KAFP;AAGC,IAAA,OAAO,EAAEI;AAHV,IAnBD,CADD;AA2BA,CA9BD;;AAgCAH,WAAW,CAACO,WAAZ,GAA0B,cAA1B;AACAP,WAAW,CAACQ,YAAZ,GAA2B;AAC1BJ,EAAAA,WAAW,EAAE;AADa,CAA3B;eAIeJ,W","sourcesContent":["// @flow\nimport React from 'react'\nimport cx from 'classnames'\nimport Button from '../../../Button/Button'\nimport ArrowBack from '../../../../../static/assets/icons/ic_arrow_back.svg'\nimport CloseIcon from '../../../../../static/assets/icons/ic_close.svg'\n\nexport type Props = {\n\t/** Title text */\n\ttitle: string,\n\n\t/** Whether this is a paged modal. Title will center on pages */\n\tisPaginated: boolean,\n\n\t/** Callback to close the modal */\n\tonRequestClose: Function,\n\n\t/** Function to handle navigating backwards in a modal */\n\tonClickBack?: Function\n}\n\nconst ModalHeader = (props: Props) => {\n\tconst { title, onRequestClose, isPaginated, onClickBack } = props\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cx('modal-header', {\n\t\t\t\t'modal-header--is-paginated': isPaginated\n\t\t\t})}\n\t\t>\n\t\t\t<div className=\"modal-header__title-wrapper\">\n\t\t\t\t{isPaginated && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tisSmall\n\t\t\t\t\t\tclassName={cx('modal-header__back-btn', {\n\t\t\t\t\t\t\t'modal-header__back-btn--is-hidden': !onClickBack\n\t\t\t\t\t\t})}\n\t\t\t\t\t\ticon={{ customIcon: ArrowBack }}\n\t\t\t\t\t\tdisabled={!onClickBack}\n\t\t\t\t\t\tonClick={onClickBack}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t<h2 className=\"modal-header__title\">{title}</h2>\n\t\t\t</div>\n\t\t\t<Button\n\t\t\t\tisSmall\n\t\t\t\ticon={{ customIcon: CloseIcon }}\n\t\t\t\tonClick={onRequestClose}\n\t\t\t/>\n\t\t</div>\n\t)\n}\n\nModalHeader.displayName = 'Modal.Header'\nModalHeader.defaultProps = {\n\tisPaginated: false\n}\n\nexport default ModalHeader\n"],"file":"ModalHeader.js"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _react = _interopRequireDefault(require("react"));
|
|
6
|
+
|
|
7
|
+
var _react2 = require("@storybook/react");
|
|
8
|
+
|
|
9
|
+
var _react3 = require("@storybook/addon-knobs/react");
|
|
10
|
+
|
|
11
|
+
var _index = _interopRequireDefault(require("./index"));
|
|
12
|
+
|
|
13
|
+
var _tabs = require("../../../.storybook/data/tabs");
|
|
14
|
+
|
|
15
|
+
var _Layout = _interopRequireDefault(require("../Layout/Layout"));
|
|
16
|
+
|
|
17
|
+
var _README = _interopRequireDefault(require("./README.md"));
|
|
18
|
+
|
|
19
|
+
var buttonKinds = {
|
|
20
|
+
Primary: 'primary',
|
|
21
|
+
Secondary: 'secondary',
|
|
22
|
+
Simple: 'simple'
|
|
23
|
+
};
|
|
24
|
+
var stories = (0, _react2.storiesOf)('Page', module).addParameters({
|
|
25
|
+
readme: {
|
|
26
|
+
sidebar: _README["default"]
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
stories.addDecorator(_react3.withKnobs);
|
|
30
|
+
stories.add('Page', function () {
|
|
31
|
+
return _react["default"].createElement(_index["default"], {
|
|
32
|
+
header: {
|
|
33
|
+
className: 'custom-classname',
|
|
34
|
+
title: (0, _react3.text)('title', 'Page Title'),
|
|
35
|
+
collapsed: (0, _react3["boolean"])('isCollapsed', false)
|
|
36
|
+
}
|
|
37
|
+
}, _react["default"].createElement(_index["default"].Content, null, _react["default"].createElement(_Layout["default"], null, _react["default"].createElement(_Layout["default"].Section, null, "See Layout for examples of page layouts."))));
|
|
38
|
+
}).add('With Back Link', function () {
|
|
39
|
+
return _react["default"].createElement(_index["default"], {
|
|
40
|
+
header: {
|
|
41
|
+
title: (0, _react3.text)('title', 'Page Title'),
|
|
42
|
+
backLinkHref: '#',
|
|
43
|
+
backLinkText: (0, _react3.text)('backLinkText', 'Back'),
|
|
44
|
+
hasBottomBorder: (0, _react3["boolean"])('hasBottomBorder', false),
|
|
45
|
+
collapsed: (0, _react3["boolean"])('isCollapsed', false)
|
|
46
|
+
}
|
|
47
|
+
}, _react["default"].createElement(_index["default"].Content, null, _react["default"].createElement(_Layout["default"], null, _react["default"].createElement(_Layout["default"].Section, null, "See Layout for examples of page layouts."))));
|
|
48
|
+
}).add('With Primary Action', function () {
|
|
49
|
+
return _react["default"].createElement(_index["default"], {
|
|
50
|
+
header: {
|
|
51
|
+
title: (0, _react3.text)('title', 'Page Title'),
|
|
52
|
+
primaryAction: {
|
|
53
|
+
text: (0, _react3["boolean"])('text', 'Do something'),
|
|
54
|
+
kind: (0, _react3.select)('kind', buttonKinds, 'primary'),
|
|
55
|
+
icon: (0, _react3.text)('icon', ''),
|
|
56
|
+
isSmall: (0, _react3["boolean"])('isSmall', true)
|
|
57
|
+
},
|
|
58
|
+
hasBottomBorder: (0, _react3["boolean"])('hasBottomBorder', false),
|
|
59
|
+
collapsed: (0, _react3["boolean"])('isCollapsed', false)
|
|
60
|
+
}
|
|
61
|
+
}, _react["default"].createElement(_index["default"].Content, null, _react["default"].createElement(_Layout["default"], null, _react["default"].createElement(_Layout["default"].Section, null, "See Layout for examples of page layouts."))));
|
|
62
|
+
}).add('With Back Link & Primary Action', function () {
|
|
63
|
+
return _react["default"].createElement(_index["default"], {
|
|
64
|
+
header: {
|
|
65
|
+
title: (0, _react3.text)('title', 'Page Title'),
|
|
66
|
+
backLinkHref: '#',
|
|
67
|
+
backLinkText: (0, _react3.text)('backLinkText', 'Back'),
|
|
68
|
+
primaryAction: {
|
|
69
|
+
text: (0, _react3["boolean"])('text', 'Do something'),
|
|
70
|
+
kind: (0, _react3.select)('kind', buttonKinds, 'primary'),
|
|
71
|
+
icon: (0, _react3.text)('icon', ''),
|
|
72
|
+
isSmall: (0, _react3["boolean"])('isSmall', true)
|
|
73
|
+
},
|
|
74
|
+
hasBottomBorder: (0, _react3["boolean"])('hasBottomBorder', false),
|
|
75
|
+
collapsed: (0, _react3["boolean"])('isCollapsed', false)
|
|
76
|
+
}
|
|
77
|
+
}, _react["default"].createElement(_index["default"].Content, null, _react["default"].createElement(_Layout["default"], null, _react["default"].createElement(_Layout["default"].Section, null, "See Layout for examples of page layouts."))));
|
|
78
|
+
}).add('Within flexible container', function () {
|
|
79
|
+
return _react["default"].createElement("div", {
|
|
80
|
+
style: {
|
|
81
|
+
display: 'flex',
|
|
82
|
+
flexDirection: 'row',
|
|
83
|
+
flex: 1,
|
|
84
|
+
overflow: 'hidden',
|
|
85
|
+
height: '50vh'
|
|
86
|
+
}
|
|
87
|
+
}, _react["default"].createElement(_index["default"], {
|
|
88
|
+
header: {
|
|
89
|
+
title: (0, _react3.text)('title', 'Page Title'),
|
|
90
|
+
backLinkHref: '#',
|
|
91
|
+
backLinkText: (0, _react3.text)('backLinkText', 'Back'),
|
|
92
|
+
primaryAction: {
|
|
93
|
+
text: (0, _react3["boolean"])('text', 'Do something'),
|
|
94
|
+
kind: (0, _react3.select)('kind', buttonKinds, 'primary'),
|
|
95
|
+
icon: (0, _react3.text)('icon', ''),
|
|
96
|
+
isSmall: (0, _react3["boolean"])('isSmall', true)
|
|
97
|
+
},
|
|
98
|
+
hasBottomBorder: (0, _react3["boolean"])('hasBottomBorder', false),
|
|
99
|
+
collapsed: (0, _react3["boolean"])('isCollapsed', false)
|
|
100
|
+
}
|
|
101
|
+
}, _react["default"].createElement(_index["default"].Content, null, _react["default"].createElement(_Layout["default"], {
|
|
102
|
+
width: "full-width"
|
|
103
|
+
}, _react["default"].createElement(_Layout["default"].Section, null, "See Layout for examples of page layouts. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum dapibus dapibus risus vel aliquet. Nam interdum lectus a massa aliquam, rutrum venenatis odio volutpat. Ut aliquet tellus consequat suscipit blandit. Praesent tempor nulla eget odio consequat scelerisque. Donec tellus massa, lacinia in neque non, vehicula accumsan tortor. Praesent a ipsum in elit tempus cursus in ut velit. Nullam pellentesque interdum metus, nec condimentum justo bibendum porta. Nullam id erat non dolor fringilla auctor. Nulla at orci at nunc facilisis fermentum. Mauris nunc lectus, tempor id feugiat id, malesuada sit amet augue. Vestibulum sollicitudin nisl finibus, maximus ex ac, suscipit ex. In elementum magna eu lacinia tincidunt. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam enim sapien, placerat ut dapibus quis, auctor eget metus. Vivamus convallis metus in malesuada fermentum. Donec et orci nulla. Phasellus hendrerit odio mi, non eleifend est pretium a. Aliquam sapien urna, sodales pulvinar tristique a, mattis sit amet sapien. Aliquam eget nunc eget tortor iaculis laoreet sit amet at urna. Morbi eu mollis risus. Phasellus nibh purus, fermentum tempor lacus quis, molestie molestie quam. Donec id risus sem. Mauris sit amet enim sapien. Sed orci orci, eleifend feugiat mauris eget, rhoncus egestas leo. Fusce sit amet turpis egestas, aliquam augue ac, laoreet nunc. Fusce malesuada mi odio, sit amet blandit odio vulputate ac. Duis a odio ut lectus ullamcorper fringilla vitae eu urna. Duis et dolor porttitor, auctor urna vitae, bibendum orci. Mauris vitae arcu placerat, tristique massa nec, euismod augue. Suspendisse maximus finibus cursus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Morbi sed dui ac urna ultricies fermentum eget vel ipsum. Nam non ullamcorper risus. Curabitur vulputate ante at facilisis venenatis. Suspendisse nulla risus, tincidunt aliquam nisl ut, porttitor tempor nibh. Maecenas at urna vel enim euismod fringilla ac vel purus. Praesent ut tempus erat. Cras viverra porta nisi, in lacinia justo tincidunt ac. Fusce bibendum sit amet mi vitae volutpat. Fusce fringilla id elit non sollicitudin. Phasellus mollis placerat dapibus. Integer scelerisque pharetra massa vel ultrices. Integer velit ex, semper eget auctor in, sodales id diam. Suspendisse eu dui dui. In sodales semper risus, eu euismod quam venenatis sit amet. Cras lobortis urna elementum dapibus dapibus. In mattis facilisis malesuada.")))));
|
|
104
|
+
}).add('With many tabs', function () {
|
|
105
|
+
return _react["default"].createElement(_index["default"], {
|
|
106
|
+
header: {
|
|
107
|
+
title: (0, _react3.text)('title', 'Page Title'),
|
|
108
|
+
backLinkHref: '#',
|
|
109
|
+
backLinkText: (0, _react3.text)('backLinkText', 'Back'),
|
|
110
|
+
tabs: _tabs.manyTabs,
|
|
111
|
+
collapsed: (0, _react3["boolean"])('isCollapsed', false)
|
|
112
|
+
}
|
|
113
|
+
}, _react["default"].createElement(_index["default"].Content, null, _react["default"].createElement(_Layout["default"], null, _react["default"].createElement(_Layout["default"].Section, null, "See Layout for examples of page layouts."))));
|
|
114
|
+
});
|
|
115
|
+
//# sourceMappingURL=Page-story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Page/Page-story.js"],"names":["buttonKinds","Primary","Secondary","Simple","stories","module","addParameters","readme","sidebar","README","addDecorator","withKnobs","add","className","title","collapsed","backLinkHref","backLinkText","hasBottomBorder","primaryAction","text","kind","icon","isSmall","display","flexDirection","flex","overflow","height","tabs","manyTabs"],"mappings":";;;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AAEA;;AAEA,IAAMA,WAAW,GAAG;AACnBC,EAAAA,OAAO,EAAE,SADU;AAEnBC,EAAAA,SAAS,EAAE,WAFQ;AAGnBC,EAAAA,MAAM,EAAE;AAHW,CAApB;AAMA,IAAMC,OAAO,GAAG,uBAAU,MAAV,EAAkBC,MAAlB,EAA0BC,aAA1B,CAAwC;AACvDC,EAAAA,MAAM,EAAE;AACPC,IAAAA,OAAO,EAAEC;AADF;AAD+C,CAAxC,CAAhB;AAMAL,OAAO,CAACM,YAAR,CAAqBC,iBAArB;AAEAP,OAAO,CACLQ,GADF,CACM,MADN,EACc;AAAA,SACZ,gCAAC,iBAAD;AACC,IAAA,MAAM,EAAE;AACPC,MAAAA,SAAS,EAAE,kBADJ;AAEPC,MAAAA,KAAK,EAAE,kBAAK,OAAL,EAAc,YAAd,CAFA;AAGPC,MAAAA,SAAS,EAAE,wBAAQ,aAAR,EAAuB,KAAvB;AAHJ;AADT,KAOC,gCAAC,iBAAD,CAAM,OAAN,QACC,gCAAC,kBAAD,QACC,gCAAC,kBAAD,CAAQ,OAAR,mDADD,CADD,CAPD,CADY;AAAA,CADd,EAkBEH,GAlBF,CAkBM,gBAlBN,EAkBwB;AAAA,SACtB,gCAAC,iBAAD;AACC,IAAA,MAAM,EAAE;AACPE,MAAAA,KAAK,EAAE,kBAAK,OAAL,EAAc,YAAd,CADA;AAEPE,MAAAA,YAAY,EAAE,GAFP;AAGPC,MAAAA,YAAY,EAAE,kBAAK,cAAL,EAAqB,MAArB,CAHP;AAIPC,MAAAA,eAAe,EAAE,wBAAQ,iBAAR,EAA2B,KAA3B,CAJV;AAKPH,MAAAA,SAAS,EAAE,wBAAQ,aAAR,EAAuB,KAAvB;AALJ;AADT,KASC,gCAAC,iBAAD,CAAM,OAAN,QACC,gCAAC,kBAAD,QACC,gCAAC,kBAAD,CAAQ,OAAR,mDADD,CADD,CATD,CADsB;AAAA,CAlBxB,EAqCEH,GArCF,CAqCM,qBArCN,EAqC6B;AAAA,SAC3B,gCAAC,iBAAD;AACC,IAAA,MAAM,EAAE;AACPE,MAAAA,KAAK,EAAE,kBAAK,OAAL,EAAc,YAAd,CADA;AAEPK,MAAAA,aAAa,EAAE;AACdC,QAAAA,IAAI,EAAE,wBAAQ,MAAR,EAAgB,cAAhB,CADQ;AAEdC,QAAAA,IAAI,EAAE,oBAAO,MAAP,EAAerB,WAAf,EAA4B,SAA5B,CAFQ;AAGdsB,QAAAA,IAAI,EAAE,kBAAK,MAAL,EAAa,EAAb,CAHQ;AAIdC,QAAAA,OAAO,EAAE,wBAAQ,SAAR,EAAmB,IAAnB;AAJK,OAFR;AAQPL,MAAAA,eAAe,EAAE,wBAAQ,iBAAR,EAA2B,KAA3B,CARV;AASPH,MAAAA,SAAS,EAAE,wBAAQ,aAAR,EAAuB,KAAvB;AATJ;AADT,KAaC,gCAAC,iBAAD,CAAM,OAAN,QACC,gCAAC,kBAAD,QACC,gCAAC,kBAAD,CAAQ,OAAR,mDADD,CADD,CAbD,CAD2B;AAAA,CArC7B,EA4DEH,GA5DF,CA4DM,iCA5DN,EA4DyC;AAAA,SACvC,gCAAC,iBAAD;AACC,IAAA,MAAM,EAAE;AACPE,MAAAA,KAAK,EAAE,kBAAK,OAAL,EAAc,YAAd,CADA;AAEPE,MAAAA,YAAY,EAAE,GAFP;AAGPC,MAAAA,YAAY,EAAE,kBAAK,cAAL,EAAqB,MAArB,CAHP;AAIPE,MAAAA,aAAa,EAAE;AACdC,QAAAA,IAAI,EAAE,wBAAQ,MAAR,EAAgB,cAAhB,CADQ;AAEdC,QAAAA,IAAI,EAAE,oBAAO,MAAP,EAAerB,WAAf,EAA4B,SAA5B,CAFQ;AAGdsB,QAAAA,IAAI,EAAE,kBAAK,MAAL,EAAa,EAAb,CAHQ;AAIdC,QAAAA,OAAO,EAAE,wBAAQ,SAAR,EAAmB,IAAnB;AAJK,OAJR;AAUPL,MAAAA,eAAe,EAAE,wBAAQ,iBAAR,EAA2B,KAA3B,CAVV;AAWPH,MAAAA,SAAS,EAAE,wBAAQ,aAAR,EAAuB,KAAvB;AAXJ;AADT,KAeC,gCAAC,iBAAD,CAAM,OAAN,QACC,gCAAC,kBAAD,QACC,gCAAC,kBAAD,CAAQ,OAAR,mDADD,CADD,CAfD,CADuC;AAAA,CA5DzC,EAqFEH,GArFF,CAqFM,2BArFN,EAqFmC;AAAA,SACjC;AACC,IAAA,KAAK,EAAE;AACNY,MAAAA,OAAO,EAAE,MADH;AAENC,MAAAA,aAAa,EAAE,KAFT;AAGNC,MAAAA,IAAI,EAAE,CAHA;AAINC,MAAAA,QAAQ,EAAE,QAJJ;AAKNC,MAAAA,MAAM,EAAE;AALF;AADR,KASC,gCAAC,iBAAD;AACC,IAAA,MAAM,EAAE;AACPd,MAAAA,KAAK,EAAE,kBAAK,OAAL,EAAc,YAAd,CADA;AAEPE,MAAAA,YAAY,EAAE,GAFP;AAGPC,MAAAA,YAAY,EAAE,kBAAK,cAAL,EAAqB,MAArB,CAHP;AAIPE,MAAAA,aAAa,EAAE;AACdC,QAAAA,IAAI,EAAE,wBAAQ,MAAR,EAAgB,cAAhB,CADQ;AAEdC,QAAAA,IAAI,EAAE,oBAAO,MAAP,EAAerB,WAAf,EAA4B,SAA5B,CAFQ;AAGdsB,QAAAA,IAAI,EAAE,kBAAK,MAAL,EAAa,EAAb,CAHQ;AAIdC,QAAAA,OAAO,EAAE,wBAAQ,SAAR,EAAmB,IAAnB;AAJK,OAJR;AAUPL,MAAAA,eAAe,EAAE,wBAAQ,iBAAR,EAA2B,KAA3B,CAVV;AAWPH,MAAAA,SAAS,EAAE,wBAAQ,aAAR,EAAuB,KAAvB;AAXJ;AADT,KAeC,gCAAC,iBAAD,CAAM,OAAN,QACC,gCAAC,kBAAD;AAAQ,IAAA,KAAK,EAAC;AAAd,KACC,gCAAC,kBAAD,CAAQ,OAAR,2kFADD,CADD,CAfD,CATD,CADiC;AAAA,CArFnC,EAiKEH,GAjKF,CAiKM,gBAjKN,EAiKwB;AAAA,SACtB,gCAAC,iBAAD;AACC,IAAA,MAAM,EAAE;AACPE,MAAAA,KAAK,EAAE,kBAAK,OAAL,EAAc,YAAd,CADA;AAEPE,MAAAA,YAAY,EAAE,GAFP;AAGPC,MAAAA,YAAY,EAAE,kBAAK,cAAL,EAAqB,MAArB,CAHP;AAIPY,MAAAA,IAAI,EAAEC,cAJC;AAKPf,MAAAA,SAAS,EAAE,wBAAQ,aAAR,EAAuB,KAAvB;AALJ;AADT,KASC,gCAAC,iBAAD,CAAM,OAAN,QACC,gCAAC,kBAAD,QACC,gCAAC,kBAAD,CAAQ,OAAR,mDADD,CADD,CATD,CADsB;AAAA,CAjKxB","sourcesContent":["// @flow\nimport React from 'react'\nimport { storiesOf } from '@storybook/react'\n\nimport { withKnobs, text, boolean, select } from '@storybook/addon-knobs/react'\nimport Page from './index'\nimport { manyTabs } from '../../../.storybook/data/tabs'\nimport Layout from '../Layout/Layout'\n\nimport README from './README.md'\n\nconst buttonKinds = {\n\tPrimary: 'primary',\n\tSecondary: 'secondary',\n\tSimple: 'simple'\n}\n\nconst stories = storiesOf('Page', module).addParameters({\n\treadme: {\n\t\tsidebar: README\n\t}\n})\n\nstories.addDecorator(withKnobs)\n\nstories\n\t.add('Page', () => (\n\t\t<Page\n\t\t\theader={{\n\t\t\t\tclassName: 'custom-classname',\n\t\t\t\ttitle: text('title', 'Page Title'),\n\t\t\t\tcollapsed: boolean('isCollapsed', false)\n\t\t\t}}\n\t\t>\n\t\t\t<Page.Content>\n\t\t\t\t<Layout>\n\t\t\t\t\t<Layout.Section>\n\t\t\t\t\t\tSee Layout for examples of page layouts.\n\t\t\t\t\t</Layout.Section>\n\t\t\t\t</Layout>\n\t\t\t</Page.Content>\n\t\t</Page>\n\t))\n\t.add('With Back Link', () => (\n\t\t<Page\n\t\t\theader={{\n\t\t\t\ttitle: text('title', 'Page Title'),\n\t\t\t\tbackLinkHref: '#',\n\t\t\t\tbackLinkText: text('backLinkText', 'Back'),\n\t\t\t\thasBottomBorder: boolean('hasBottomBorder', false),\n\t\t\t\tcollapsed: boolean('isCollapsed', false)\n\t\t\t}}\n\t\t>\n\t\t\t<Page.Content>\n\t\t\t\t<Layout>\n\t\t\t\t\t<Layout.Section>\n\t\t\t\t\t\tSee Layout for examples of page layouts.\n\t\t\t\t\t</Layout.Section>\n\t\t\t\t</Layout>\n\t\t\t</Page.Content>\n\t\t</Page>\n\t))\n\t.add('With Primary Action', () => (\n\t\t<Page\n\t\t\theader={{\n\t\t\t\ttitle: text('title', 'Page Title'),\n\t\t\t\tprimaryAction: {\n\t\t\t\t\ttext: boolean('text', 'Do something'),\n\t\t\t\t\tkind: select('kind', buttonKinds, 'primary'),\n\t\t\t\t\ticon: text('icon', ''),\n\t\t\t\t\tisSmall: boolean('isSmall', true)\n\t\t\t\t},\n\t\t\t\thasBottomBorder: boolean('hasBottomBorder', false),\n\t\t\t\tcollapsed: boolean('isCollapsed', false)\n\t\t\t}}\n\t\t>\n\t\t\t<Page.Content>\n\t\t\t\t<Layout>\n\t\t\t\t\t<Layout.Section>\n\t\t\t\t\t\tSee Layout for examples of page layouts.\n\t\t\t\t\t</Layout.Section>\n\t\t\t\t</Layout>\n\t\t\t</Page.Content>\n\t\t</Page>\n\t))\n\t.add('With Back Link & Primary Action', () => (\n\t\t<Page\n\t\t\theader={{\n\t\t\t\ttitle: text('title', 'Page Title'),\n\t\t\t\tbackLinkHref: '#',\n\t\t\t\tbackLinkText: text('backLinkText', 'Back'),\n\t\t\t\tprimaryAction: {\n\t\t\t\t\ttext: boolean('text', 'Do something'),\n\t\t\t\t\tkind: select('kind', buttonKinds, 'primary'),\n\t\t\t\t\ticon: text('icon', ''),\n\t\t\t\t\tisSmall: boolean('isSmall', true)\n\t\t\t\t},\n\t\t\t\thasBottomBorder: boolean('hasBottomBorder', false),\n\t\t\t\tcollapsed: boolean('isCollapsed', false)\n\t\t\t}}\n\t\t>\n\t\t\t<Page.Content>\n\t\t\t\t<Layout>\n\t\t\t\t\t<Layout.Section>\n\t\t\t\t\t\tSee Layout for examples of page layouts.\n\t\t\t\t\t</Layout.Section>\n\t\t\t\t</Layout>\n\t\t\t</Page.Content>\n\t\t</Page>\n\t))\n\t.add('Within flexible container', () => (\n\t\t<div\n\t\t\tstyle={{\n\t\t\t\tdisplay: 'flex',\n\t\t\t\tflexDirection: 'row',\n\t\t\t\tflex: 1,\n\t\t\t\toverflow: 'hidden',\n\t\t\t\theight: '50vh'\n\t\t\t}}\n\t\t>\n\t\t\t<Page\n\t\t\t\theader={{\n\t\t\t\t\ttitle: text('title', 'Page Title'),\n\t\t\t\t\tbackLinkHref: '#',\n\t\t\t\t\tbackLinkText: text('backLinkText', 'Back'),\n\t\t\t\t\tprimaryAction: {\n\t\t\t\t\t\ttext: boolean('text', 'Do something'),\n\t\t\t\t\t\tkind: select('kind', buttonKinds, 'primary'),\n\t\t\t\t\t\ticon: text('icon', ''),\n\t\t\t\t\t\tisSmall: boolean('isSmall', true)\n\t\t\t\t\t},\n\t\t\t\t\thasBottomBorder: boolean('hasBottomBorder', false),\n\t\t\t\t\tcollapsed: boolean('isCollapsed', false)\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<Page.Content>\n\t\t\t\t\t<Layout width=\"full-width\">\n\t\t\t\t\t\t<Layout.Section>\n\t\t\t\t\t\t\tSee Layout for examples of page layouts. Lorem ipsum dolor sit\n\t\t\t\t\t\t\tamet, consectetur adipiscing elit. Vestibulum dapibus dapibus\n\t\t\t\t\t\t\trisus vel aliquet. Nam interdum lectus a massa aliquam, rutrum\n\t\t\t\t\t\t\tvenenatis odio volutpat. Ut aliquet tellus consequat suscipit\n\t\t\t\t\t\t\tblandit. Praesent tempor nulla eget odio consequat scelerisque.\n\t\t\t\t\t\t\tDonec tellus massa, lacinia in neque non, vehicula accumsan\n\t\t\t\t\t\t\ttortor. Praesent a ipsum in elit tempus cursus in ut velit. Nullam\n\t\t\t\t\t\t\tpellentesque interdum metus, nec condimentum justo bibendum porta.\n\t\t\t\t\t\t\tNullam id erat non dolor fringilla auctor. Nulla at orci at nunc\n\t\t\t\t\t\t\tfacilisis fermentum. Mauris nunc lectus, tempor id feugiat id,\n\t\t\t\t\t\t\tmalesuada sit amet augue. Vestibulum sollicitudin nisl finibus,\n\t\t\t\t\t\t\tmaximus ex ac, suscipit ex. In elementum magna eu lacinia\n\t\t\t\t\t\t\ttincidunt. Lorem ipsum dolor sit amet, consectetur adipiscing\n\t\t\t\t\t\t\telit. Vestibulum ante ipsum primis in faucibus orci luctus et\n\t\t\t\t\t\t\tultrices posuere cubilia Curae; Aliquam enim sapien, placerat ut\n\t\t\t\t\t\t\tdapibus quis, auctor eget metus. Vivamus convallis metus in\n\t\t\t\t\t\t\tmalesuada fermentum. Donec et orci nulla. Phasellus hendrerit odio\n\t\t\t\t\t\t\tmi, non eleifend est pretium a. Aliquam sapien urna, sodales\n\t\t\t\t\t\t\tpulvinar tristique a, mattis sit amet sapien. Aliquam eget nunc\n\t\t\t\t\t\t\teget tortor iaculis laoreet sit amet at urna. Morbi eu mollis\n\t\t\t\t\t\t\trisus. Phasellus nibh purus, fermentum tempor lacus quis, molestie\n\t\t\t\t\t\t\tmolestie quam. Donec id risus sem. Mauris sit amet enim sapien.\n\t\t\t\t\t\t\tSed orci orci, eleifend feugiat mauris eget, rhoncus egestas leo.\n\t\t\t\t\t\t\tFusce sit amet turpis egestas, aliquam augue ac, laoreet nunc.\n\t\t\t\t\t\t\tFusce malesuada mi odio, sit amet blandit odio vulputate ac. Duis\n\t\t\t\t\t\t\ta odio ut lectus ullamcorper fringilla vitae eu urna. Duis et\n\t\t\t\t\t\t\tdolor porttitor, auctor urna vitae, bibendum orci. Mauris vitae\n\t\t\t\t\t\t\tarcu placerat, tristique massa nec, euismod augue. Suspendisse\n\t\t\t\t\t\t\tmaximus finibus cursus. Vestibulum ante ipsum primis in faucibus\n\t\t\t\t\t\t\torci luctus et ultrices posuere cubilia Curae; Morbi sed dui ac\n\t\t\t\t\t\t\turna ultricies fermentum eget vel ipsum. Nam non ullamcorper\n\t\t\t\t\t\t\trisus. Curabitur vulputate ante at facilisis venenatis.\n\t\t\t\t\t\t\tSuspendisse nulla risus, tincidunt aliquam nisl ut, porttitor\n\t\t\t\t\t\t\ttempor nibh. Maecenas at urna vel enim euismod fringilla ac vel\n\t\t\t\t\t\t\tpurus. Praesent ut tempus erat. Cras viverra porta nisi, in\n\t\t\t\t\t\t\tlacinia justo tincidunt ac. Fusce bibendum sit amet mi vitae\n\t\t\t\t\t\t\tvolutpat. Fusce fringilla id elit non sollicitudin. Phasellus\n\t\t\t\t\t\t\tmollis placerat dapibus. Integer scelerisque pharetra massa vel\n\t\t\t\t\t\t\tultrices. Integer velit ex, semper eget auctor in, sodales id\n\t\t\t\t\t\t\tdiam. Suspendisse eu dui dui. In sodales semper risus, eu euismod\n\t\t\t\t\t\t\tquam venenatis sit amet. Cras lobortis urna elementum dapibus\n\t\t\t\t\t\t\tdapibus. In mattis facilisis malesuada.\n\t\t\t\t\t\t</Layout.Section>\n\t\t\t\t\t</Layout>\n\t\t\t\t</Page.Content>\n\t\t\t</Page>\n\t\t</div>\n\t))\n\t.add('With many tabs', () => (\n\t\t<Page\n\t\t\theader={{\n\t\t\t\ttitle: text('title', 'Page Title'),\n\t\t\t\tbackLinkHref: '#',\n\t\t\t\tbackLinkText: text('backLinkText', 'Back'),\n\t\t\t\ttabs: manyTabs,\n\t\t\t\tcollapsed: boolean('isCollapsed', false)\n\t\t\t}}\n\t\t>\n\t\t\t<Page.Content>\n\t\t\t\t<Layout>\n\t\t\t\t\t<Layout.Section>\n\t\t\t\t\t\tSee Layout for examples of page layouts.\n\t\t\t\t\t</Layout.Section>\n\t\t\t\t</Layout>\n\t\t\t</Page.Content>\n\t\t</Page>\n\t))\n"],"file":"Page-story.js"}
|
|
@@ -0,0 +1,55 @@
|
|
|
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"] = exports.Page = void 0;
|
|
9
|
+
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
12
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
+
|
|
14
|
+
var _react = _interopRequireDefault(require("react"));
|
|
15
|
+
|
|
16
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
|
+
|
|
18
|
+
var _PageHeader = _interopRequireDefault(require("./components/PageHeader/PageHeader"));
|
|
19
|
+
|
|
20
|
+
var _PageContent = _interopRequireDefault(require("./components/PageContent/PageContent"));
|
|
21
|
+
|
|
22
|
+
var Page = function Page(props) {
|
|
23
|
+
var children = props.children,
|
|
24
|
+
isCentered = props.isCentered,
|
|
25
|
+
hasHeader = props.hasHeader,
|
|
26
|
+
className = props.className,
|
|
27
|
+
header = props.header,
|
|
28
|
+
sidebarIsCollapsed = props.sidebarIsCollapsed,
|
|
29
|
+
sidebar = props.sidebar,
|
|
30
|
+
rest = (0, _objectWithoutProperties2["default"])(props, ["children", "isCentered", "hasHeader", "className", "header", "sidebarIsCollapsed", "sidebar"]);
|
|
31
|
+
return _react["default"].createElement("div", (0, _extends2["default"])({}, rest, {
|
|
32
|
+
className: (0, _classnames["default"])('page', className, {
|
|
33
|
+
'page--centered': isCentered,
|
|
34
|
+
'page--no-header': !hasHeader,
|
|
35
|
+
'page--sidebar-is-collapsed': sidebarIsCollapsed
|
|
36
|
+
})
|
|
37
|
+
}), _react["default"].createElement("div", {
|
|
38
|
+
className: 'page__content-container'
|
|
39
|
+
}, header && _react["default"].createElement(_PageHeader["default"], header), children), sidebar && _react["default"].createElement("div", {
|
|
40
|
+
className: 'page__sidebar'
|
|
41
|
+
}, sidebar));
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
exports.Page = Page;
|
|
45
|
+
Page.Header = _PageHeader["default"];
|
|
46
|
+
Page.Content = _PageContent["default"];
|
|
47
|
+
Page.defaultProps = {
|
|
48
|
+
isCentered: false,
|
|
49
|
+
hasHeader: true,
|
|
50
|
+
header: null,
|
|
51
|
+
sidebarIsCollapsed: false
|
|
52
|
+
};
|
|
53
|
+
var _default = Page;
|
|
54
|
+
exports["default"] = _default;
|
|
55
|
+
//# sourceMappingURL=Page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Page/Page.js"],"names":["Page","props","children","isCentered","hasHeader","className","header","sidebarIsCollapsed","sidebar","rest","Header","PageHeader","Content","PageContent","defaultProps"],"mappings":";;;;;;;;;;;;;AACA;;AAEA;;AACA;;AACA;;AAwBO,IAAMA,IAAI,GAAG,SAAPA,IAAO,CAACC,KAAD,EAAsB;AAAA,MAExCC,QAFwC,GAUrCD,KAVqC,CAExCC,QAFwC;AAAA,MAGxCC,UAHwC,GAUrCF,KAVqC,CAGxCE,UAHwC;AAAA,MAIxCC,SAJwC,GAUrCH,KAVqC,CAIxCG,SAJwC;AAAA,MAKxCC,SALwC,GAUrCJ,KAVqC,CAKxCI,SALwC;AAAA,MAMxCC,MANwC,GAUrCL,KAVqC,CAMxCK,MANwC;AAAA,MAOxCC,kBAPwC,GAUrCN,KAVqC,CAOxCM,kBAPwC;AAAA,MAQxCC,OARwC,GAUrCP,KAVqC,CAQxCO,OARwC;AAAA,MASrCC,IATqC,6CAUrCR,KAVqC;AAWzC,SACC,qEACKQ,IADL;AAEC,IAAA,SAAS,EAAE,4BAAG,MAAH,EAAWJ,SAAX,EAAsB;AAChC,wBAAkBF,UADc;AAEhC,yBAAmB,CAACC,SAFY;AAGhC,oCAA8BG;AAHE,KAAtB;AAFZ,MAQC;AAAK,IAAA,SAAS,EAAE;AAAhB,KACED,MAAM,IAAI,gCAAC,sBAAD,EAAgBA,MAAhB,CADZ,EAEEJ,QAFF,CARD,EAYEM,OAAO,IAAI;AAAK,IAAA,SAAS,EAAE;AAAhB,KAAkCA,OAAlC,CAZb,CADD;AAgBA,CA3BM;;;AA6BPR,IAAI,CAACU,MAAL,GAAcC,sBAAd;AACAX,IAAI,CAACY,OAAL,GAAeC,uBAAf;AAEAb,IAAI,CAACc,YAAL,GAAoB;AACnBX,EAAAA,UAAU,EAAE,KADO;AAEnBC,EAAAA,SAAS,EAAE,IAFQ;AAGnBE,EAAAA,MAAM,EAAE,IAHW;AAInBC,EAAAA,kBAAkB,EAAE;AAJD,CAApB;eAOeP,I","sourcesContent":["// @flow\nimport React from 'react'\nimport type { Node } from 'react'\nimport cx from 'classnames'\nimport PageHeader from './components/PageHeader/PageHeader'\nimport PageContent from './components/PageContent/PageContent'\nimport type { PageHeaderProps } from './components/PageHeader/PageHeader'\n\n// Card\ntype PageProps = {\n\t/** Should be Card Header, Card Body, and Card Footer, unless using the card background for styling only. */\n\tchildren: Node,\n\n\t/** Set true to make page content center aligned. */\n\tisCentered?: boolean,\n\n\t/** Set false to add extra spacing to top of page when there is no PageHeader. */\n\thasHeader?: boolean,\n\n\t/** Optional classname */\n\tclassName?: string,\n\n\t/** Page header props */\n\theader?: PageHeaderProps,\n\n\t/** Set true if the page has a sidebar that is collapsed. Defaults to false. */\n\tsidebarIsCollapsed?: boolean\n}\n\nexport const Page = (props: PageProps) => {\n\tconst {\n\t\tchildren,\n\t\tisCentered,\n\t\thasHeader,\n\t\tclassName,\n\t\theader,\n\t\tsidebarIsCollapsed,\n\t\tsidebar,\n\t\t...rest\n\t} = props\n\treturn (\n\t\t<div\n\t\t\t{...rest}\n\t\t\tclassName={cx('page', className, {\n\t\t\t\t'page--centered': isCentered,\n\t\t\t\t'page--no-header': !hasHeader,\n\t\t\t\t'page--sidebar-is-collapsed': sidebarIsCollapsed\n\t\t\t})}\n\t\t>\n\t\t\t<div className={'page__content-container'}>\n\t\t\t\t{header && <PageHeader {...header} />}\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t\t{sidebar && <div className={'page__sidebar'}>{sidebar}</div>}\n\t\t</div>\n\t)\n}\n\nPage.Header = PageHeader\nPage.Content = PageContent\n\nPage.defaultProps = {\n\tisCentered: false,\n\thasHeader: true,\n\theader: null,\n\tsidebarIsCollapsed: false\n}\n\nexport default Page\n"],"file":"Page.js"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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 _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var PageContent = function PageContent(props) {
|
|
13
|
+
var children = props.children;
|
|
14
|
+
return _react["default"].createElement("div", {
|
|
15
|
+
className: "page__content"
|
|
16
|
+
}, children);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
PageContent.displayName = 'Page.Content';
|
|
20
|
+
var _default = PageContent;
|
|
21
|
+
exports["default"] = _default;
|
|
22
|
+
//# sourceMappingURL=PageContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/Page/components/PageContent/PageContent.js"],"names":["PageContent","props","children","displayName"],"mappings":";;;;;;;;;AACA;;AAOA,IAAMA,WAAW,GAAG,SAAdA,WAAc,CAACC,KAAD,EAAkB;AAAA,MAC7BC,QAD6B,GAChBD,KADgB,CAC7BC,QAD6B;AAGrC,SAAO;AAAK,IAAA,SAAS,EAAC;AAAf,KAAgCA,QAAhC,CAAP;AACA,CAJD;;AAMAF,WAAW,CAACG,WAAZ,GAA0B,cAA1B;eACeH,W","sourcesContent":["// @flow\nimport React from 'react'\n\nexport type Props = {\n\t/** Contents of the Page */\n\tchildren: Node\n}\n\nconst PageContent = (props: Props) => {\n\tconst { children } = props\n\n\treturn <div className=\"page__content\">{children}</div>\n}\n\nPageContent.displayName = 'Page.Content'\nexport default PageContent\n"],"file":"PageContent.js"}
|
|
@@ -0,0 +1,127 @@
|
|
|
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 _is_js = _interopRequireDefault(require("is_js"));
|
|
15
|
+
|
|
16
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
|
+
|
|
18
|
+
var _link = _interopRequireDefault(require("next/link"));
|
|
19
|
+
|
|
20
|
+
var _Icon = _interopRequireDefault(require("../../../Icon/Icon"));
|
|
21
|
+
|
|
22
|
+
var _Button = _interopRequireDefault(require("../../../Button/Button"));
|
|
23
|
+
|
|
24
|
+
var _Tabs = _interopRequireDefault(require("../../../Tabs/Tabs"));
|
|
25
|
+
|
|
26
|
+
var BackIcon = function BackIcon(props) {
|
|
27
|
+
return _react["default"].createElement("svg", props, _react["default"].createElement("path", {
|
|
28
|
+
fillRule: "evenodd",
|
|
29
|
+
clipRule: "evenodd",
|
|
30
|
+
d: "M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"
|
|
31
|
+
}));
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
BackIcon.defaultProps = {
|
|
35
|
+
width: "24",
|
|
36
|
+
height: "24",
|
|
37
|
+
viewBox: "0 0 24 24",
|
|
38
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
var PageHeader = function PageHeader(props) {
|
|
42
|
+
var _props$backLinkCompon = props.backLinkComponent,
|
|
43
|
+
RelativeBackLinkComponent = _props$backLinkCompon === void 0 ? _link["default"] : _props$backLinkCompon,
|
|
44
|
+
backLinkHref = props.backLinkHref,
|
|
45
|
+
backLinkText = props.backLinkText,
|
|
46
|
+
className = props.className,
|
|
47
|
+
_props$collapsed = props.collapsed,
|
|
48
|
+
collapsed = _props$collapsed === void 0 ? false : _props$collapsed,
|
|
49
|
+
hasBottomBorder = props.hasBottomBorder,
|
|
50
|
+
linkProps = props.linkProps,
|
|
51
|
+
onClickBack = props.onClickBack,
|
|
52
|
+
primaryAction = props.primaryAction,
|
|
53
|
+
sidebarExpander = props.sidebarExpander,
|
|
54
|
+
tabs = props.tabs,
|
|
55
|
+
title = props.title;
|
|
56
|
+
var backLinkClass = 'page__header-back-link';
|
|
57
|
+
var anchor;
|
|
58
|
+
|
|
59
|
+
if (onClickBack || backLinkHref) {
|
|
60
|
+
var backIcon = _react["default"].createElement("span", {
|
|
61
|
+
className: "page__header-back-link-icon"
|
|
62
|
+
}, _react["default"].createElement(_Icon["default"], {
|
|
63
|
+
customIcon: BackIcon
|
|
64
|
+
}));
|
|
65
|
+
|
|
66
|
+
if (onClickBack) {
|
|
67
|
+
anchor = _react["default"].createElement("button", {
|
|
68
|
+
className: (0, _classnames["default"])(backLinkClass, 'btn'),
|
|
69
|
+
type: "button",
|
|
70
|
+
onClick: onClickBack
|
|
71
|
+
}, backIcon, backLinkText);
|
|
72
|
+
} else if (backLinkHref) {
|
|
73
|
+
// Check if the link is relative (client-side) or absolute
|
|
74
|
+
var linkIsRelative = true;
|
|
75
|
+
|
|
76
|
+
if (backLinkHref && _is_js["default"].url(backLinkHref)) {
|
|
77
|
+
linkIsRelative = false;
|
|
78
|
+
} // Only return a Next link if the href is relative
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
anchor = linkIsRelative ? _react["default"].createElement(RelativeBackLinkComponent, (0, _extends2["default"])({
|
|
82
|
+
href: backLinkHref
|
|
83
|
+
}, linkProps), _react["default"].createElement("a", {
|
|
84
|
+
className: backLinkClass
|
|
85
|
+
}, backIcon, backLinkText)) : _react["default"].createElement("a", {
|
|
86
|
+
href: backLinkHref,
|
|
87
|
+
className: backLinkClass
|
|
88
|
+
}, backIcon, backLinkText);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return _react["default"].createElement("header", {
|
|
93
|
+
className: (0, _classnames["default"])('page__header', {
|
|
94
|
+
'page__header--is-collapsed': collapsed
|
|
95
|
+
}, className)
|
|
96
|
+
}, _react["default"].createElement("div", {
|
|
97
|
+
className: (0, _classnames["default"])('page__header-inner', {
|
|
98
|
+
'page__header-inner--is-collapsed': collapsed
|
|
99
|
+
})
|
|
100
|
+
}, anchor && anchor, _react["default"].createElement("div", {
|
|
101
|
+
className: (0, _classnames["default"])('page__header-main', {
|
|
102
|
+
'page__header-main--has-bottom-border': hasBottomBorder
|
|
103
|
+
})
|
|
104
|
+
}, _react["default"].createElement("div", {
|
|
105
|
+
className: "page__header-title-wrapper"
|
|
106
|
+
}, _react["default"].createElement("h1", null, title), _react["default"].createElement("div", null, sidebarExpander && _react["default"].createElement(_Button["default"], (0, _extends2["default"])({}, sidebarExpander, {
|
|
107
|
+
isSmall: true,
|
|
108
|
+
className: "page__header-sidebar-btn"
|
|
109
|
+
})), primaryAction && _react["default"].createElement(_Button["default"], primaryAction))))), tabs && tabs.length > 0 && _react["default"].createElement(_Tabs["default"], {
|
|
110
|
+
isPadded: false,
|
|
111
|
+
className: "page__header-tabs",
|
|
112
|
+
tabs: tabs
|
|
113
|
+
}));
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
PageHeader.displayName = 'Page.Header';
|
|
117
|
+
PageHeader.defaultProps = {
|
|
118
|
+
title: '',
|
|
119
|
+
backLinkText: 'Back',
|
|
120
|
+
backLinkHref: '',
|
|
121
|
+
primaryAction: null,
|
|
122
|
+
hasBottomBorder: false,
|
|
123
|
+
tabs: []
|
|
124
|
+
};
|
|
125
|
+
var _default = PageHeader;
|
|
126
|
+
exports["default"] = _default;
|
|
127
|
+
//# sourceMappingURL=PageHeader.js.map
|