@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 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/Page/components/PageHeader/PageHeader.js"],"names":["BackIcon","PageHeader","props","backLinkComponent","RelativeBackLinkComponent","Link","backLinkHref","backLinkText","className","collapsed","hasBottomBorder","linkProps","onClickBack","primaryAction","sidebarExpander","tabs","title","backLinkClass","anchor","backIcon","linkIsRelative","is","url","length","displayName","defaultProps"],"mappings":"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","sourcesContent":["// @flow\nimport React from 'react'\nimport is from 'is_js'\nimport cx from 'classnames'\nimport Link from 'next/link'\nimport type { Props as LinkProps } from 'next/link'\nimport type { Props as ButtonProps } from '../../../Button/Button'\nimport type { Props as TabsProps } from '../../../Tabs/Tabs'\nimport Icon from '../../../Icon/Icon'\nimport Button from '../../../Button/Button'\nimport Tabs from '../../../Tabs/Tabs'\nimport BackIcon from '../../../../../static/assets/icons/ic_keyboard_arrow_left.svg'\n\nexport type PageHeaderProps = {\n\t/** Title of the Page */\n\ttitle?: string,\n\n\t/** Optional back link href. Outputs next Link if relative, otherwise outputs anchor */\n\tbackLinkHref?: string,\n\n\t/** Optional function to handle back click */\n\tonClickBack?: Function,\n\n\t/** Back link text */\n\tbackLinkText?: string,\n\n\t/** Props for Next router link: https://nextjs.org/docs/#routing. */\n\tlinkProps?: LinkProps,\n\n\t/** Is the header collapsed? */\n\tcollapsed?: boolean,\n\n\t/** Adds a button to the page header for its primary action. */\n\tprimaryAction?: ButtonProps,\n\n\t/** Adds tabbed navigation for subviews */\n\ttabs?: TabsProps,\n\n\t/** Set true to add a border to the page header */\n\thasBottomBorder?: boolean,\n\n\t/** Adds an element to expand the right sidebar */\n\tsidebarExpander: ButtonProps\n}\n\nconst PageHeader = (props: PageHeaderProps) => {\n\tconst {\n\t\tbackLinkComponent: RelativeBackLinkComponent = Link,\n\t\tbackLinkHref,\n\t\tbackLinkText,\n\t\tclassName,\n\t\tcollapsed = false,\n\t\thasBottomBorder,\n\t\tlinkProps,\n\t\tonClickBack,\n\t\tprimaryAction,\n\t\tsidebarExpander,\n\t\ttabs,\n\t\ttitle\n\t} = props\n\n\tconst backLinkClass = 'page__header-back-link'\n\tlet anchor\n\n\tif (onClickBack || backLinkHref) {\n\t\tconst backIcon = (\n\t\t\t<span className=\"page__header-back-link-icon\">\n\t\t\t\t<Icon customIcon={BackIcon} />\n\t\t\t</span>\n\t\t)\n\n\t\tif (onClickBack) {\n\t\t\tanchor = (\n\t\t\t\t<button\n\t\t\t\t\tclassName={cx(backLinkClass, 'btn')}\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tonClick={onClickBack}\n\t\t\t\t>\n\t\t\t\t\t{backIcon}\n\t\t\t\t\t{backLinkText}\n\t\t\t\t</button>\n\t\t\t)\n\t\t} else if (backLinkHref) {\n\t\t\t// Check if the link is relative (client-side) or absolute\n\t\t\tlet linkIsRelative = true\n\t\t\tif (backLinkHref && is.url(backLinkHref)) {\n\t\t\t\tlinkIsRelative = false\n\t\t\t}\n\t\t\t// Only return a Next link if the href is relative\n\t\t\tanchor = linkIsRelative ? (\n\t\t\t\t<RelativeBackLinkComponent href={backLinkHref} {...linkProps}>\n\t\t\t\t\t<a className={backLinkClass}>\n\t\t\t\t\t\t{backIcon}\n\t\t\t\t\t\t{backLinkText}\n\t\t\t\t\t</a>\n\t\t\t\t</RelativeBackLinkComponent>\n\t\t\t) : (\n\t\t\t\t<a href={backLinkHref} className={backLinkClass}>\n\t\t\t\t\t{backIcon}\n\t\t\t\t\t{backLinkText}\n\t\t\t\t</a>\n\t\t\t)\n\t\t}\n\t}\n\n\treturn (\n\t\t<header\n\t\t\tclassName={cx(\n\t\t\t\t'page__header',\n\t\t\t\t{\n\t\t\t\t\t'page__header--is-collapsed': collapsed\n\t\t\t\t},\n\t\t\t\tclassName\n\t\t\t)}\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={cx('page__header-inner', {\n\t\t\t\t\t'page__header-inner--is-collapsed': collapsed\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{anchor && anchor}\n\t\t\t\t<div\n\t\t\t\t\tclassName={cx('page__header-main', {\n\t\t\t\t\t\t'page__header-main--has-bottom-border': hasBottomBorder\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t<div className=\"page__header-title-wrapper\">\n\t\t\t\t\t\t<h1>{title}</h1>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t{sidebarExpander && (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t{...sidebarExpander}\n\t\t\t\t\t\t\t\t\tisSmall\n\t\t\t\t\t\t\t\t\tclassName=\"page__header-sidebar-btn\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{primaryAction && <Button {...primaryAction} />}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{tabs && tabs.length > 0 && (\n\t\t\t\t<Tabs isPadded={false} className=\"page__header-tabs\" tabs={tabs} />\n\t\t\t)}\n\t\t</header>\n\t)\n}\n\nPageHeader.displayName = 'Page.Header'\nPageHeader.defaultProps = {\n\ttitle: '',\n\tbackLinkText: 'Back',\n\tbackLinkHref: '',\n\tprimaryAction: null,\n\thasBottomBorder: false,\n\ttabs: []\n}\n\nexport default PageHeader\n"],"file":"PageHeader.js"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
Object.defineProperty(exports, "default", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function get() {
|
|
11
|
+
return _Page["default"];
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, "PageHeader", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function get() {
|
|
17
|
+
return _PageHeader2["default"];
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "PageContent", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function get() {
|
|
23
|
+
return _PageContent2["default"];
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
var _Page = _interopRequireDefault(require("./Page"));
|
|
28
|
+
|
|
29
|
+
var _PageHeader2 = _interopRequireDefault(require("./components/PageHeader/PageHeader"));
|
|
30
|
+
|
|
31
|
+
var _PageContent2 = _interopRequireDefault(require("./components/PageContent/PageContent"));
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[],"file":"index.js"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
+
|
|
7
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
8
|
+
|
|
9
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
+
|
|
11
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
12
|
+
|
|
13
|
+
var _getPrototypeOf3 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
|
+
|
|
15
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
16
|
+
|
|
17
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
18
|
+
|
|
19
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
20
|
+
|
|
21
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
22
|
+
|
|
23
|
+
var _react2 = require("@storybook/react");
|
|
24
|
+
|
|
25
|
+
var _react3 = require("@storybook/addon-knobs/react");
|
|
26
|
+
|
|
27
|
+
var _PagedModal = _interopRequireDefault(require("./PagedModal"));
|
|
28
|
+
|
|
29
|
+
var _Forms = require("../Forms");
|
|
30
|
+
|
|
31
|
+
var PageModalExample =
|
|
32
|
+
/*#__PURE__*/
|
|
33
|
+
function (_Component) {
|
|
34
|
+
(0, _inherits2["default"])(PageModalExample, _Component);
|
|
35
|
+
|
|
36
|
+
function PageModalExample() {
|
|
37
|
+
var _getPrototypeOf2;
|
|
38
|
+
|
|
39
|
+
var _this;
|
|
40
|
+
|
|
41
|
+
(0, _classCallCheck2["default"])(this, PageModalExample);
|
|
42
|
+
|
|
43
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
44
|
+
args[_key] = arguments[_key];
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
_this = (0, _possibleConstructorReturn2["default"])(this, (_getPrototypeOf2 = (0, _getPrototypeOf3["default"])(PageModalExample)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
48
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "state", {
|
|
49
|
+
currentPageIndex: 0
|
|
50
|
+
});
|
|
51
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleBack", function () {
|
|
52
|
+
_this.setState(function (prevState) {
|
|
53
|
+
return {
|
|
54
|
+
currentPageIndex: prevState.currentPageIndex > 0 ? prevState.currentPageIndex - 1 : 0
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
return _this;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
(0, _createClass2["default"])(PageModalExample, [{
|
|
62
|
+
key: "render",
|
|
63
|
+
value: function render() {
|
|
64
|
+
var _this2 = this;
|
|
65
|
+
|
|
66
|
+
var currentPageIndex = this.state.currentPageIndex;
|
|
67
|
+
return _react["default"].createElement(_PagedModal["default"], {
|
|
68
|
+
isOpen: (0, _react3["boolean"])('isOpen', true),
|
|
69
|
+
onAfterOpen: function onAfterOpen() {
|
|
70
|
+
return console.log('onAfterOpen');
|
|
71
|
+
},
|
|
72
|
+
onRequestClose: function onRequestClose() {
|
|
73
|
+
return console.log('onRequestClose');
|
|
74
|
+
},
|
|
75
|
+
onClickBack: this.handleBack,
|
|
76
|
+
canGoBack: currentPageIndex > 0,
|
|
77
|
+
isSmall: (0, _react3["boolean"])('isSmall', true),
|
|
78
|
+
pages: [{
|
|
79
|
+
title: 'Page 1',
|
|
80
|
+
isCurrent: currentPageIndex === 0,
|
|
81
|
+
body: _react["default"].createElement(_Forms.FormLayout, null, _react["default"].createElement(_Forms.FormLayoutItem, null, _react["default"].createElement(_Forms.TextInput, {
|
|
82
|
+
label: "Phone Number",
|
|
83
|
+
placeholder: "(555)-555-5555"
|
|
84
|
+
}))),
|
|
85
|
+
footerPrimaryAction: {
|
|
86
|
+
text: 'Next',
|
|
87
|
+
onClick: function onClick() {
|
|
88
|
+
return _this2.setState({
|
|
89
|
+
currentPageIndex: 1
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}, {
|
|
94
|
+
title: 'Page 2',
|
|
95
|
+
isCurrent: currentPageIndex === 1,
|
|
96
|
+
body: _react["default"].createElement(_Forms.FormLayout, null, _react["default"].createElement(_Forms.FormLayoutItem, null, _react["default"].createElement(_Forms.TextInput, {
|
|
97
|
+
label: "First Name"
|
|
98
|
+
}))),
|
|
99
|
+
footerPrimaryAction: {
|
|
100
|
+
text: 'Submit',
|
|
101
|
+
onClick: function onClick() {
|
|
102
|
+
return console.log('Submit!');
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}]
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}]);
|
|
109
|
+
return PageModalExample;
|
|
110
|
+
}(_react.Component);
|
|
111
|
+
|
|
112
|
+
var stories = (0, _react2.storiesOf)('Paged Modal', module);
|
|
113
|
+
stories.addDecorator(_react3.withKnobs);
|
|
114
|
+
stories.add('Page Modal', function () {
|
|
115
|
+
return _react["default"].createElement(PageModalExample, null);
|
|
116
|
+
}, {
|
|
117
|
+
jsx: {
|
|
118
|
+
skip: 1
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
//# sourceMappingURL=PagedModal-story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/PagedModal/PagedModal-story.js"],"names":["PageModalExample","currentPageIndex","setState","prevState","state","console","log","handleBack","title","isCurrent","body","footerPrimaryAction","text","onClick","Component","stories","module","addDecorator","withKnobs","add","jsx","skip"],"mappings":";;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AACA;;AACA;;AACA;;IAQMA,gB;;;;;;;;;;;;;;;;;8FACG;AACPC,MAAAA,gBAAgB,EAAE;AADX,K;mGAIK,YAAM;AAClB,YAAKC,QAAL,CAAc,UAAAC,SAAS;AAAA,eAAK;AAC3BF,UAAAA,gBAAgB,EACfE,SAAS,CAACF,gBAAV,GAA6B,CAA7B,GAAiCE,SAAS,CAACF,gBAAV,GAA6B,CAA9D,GAAkE;AAFxC,SAAL;AAAA,OAAvB;AAIA,K;;;;;;6BAEQ;AAAA;;AAAA,UACAA,gBADA,GACqB,KAAKG,KAD1B,CACAH,gBADA;AAGR,aACC,gCAAC,sBAAD;AACC,QAAA,MAAM,EAAE,wBAAQ,QAAR,EAAkB,IAAlB,CADT;AAEC,QAAA,WAAW,EAAE;AAAA,iBAAMI,OAAO,CAACC,GAAR,CAAY,aAAZ,CAAN;AAAA,SAFd;AAGC,QAAA,cAAc,EAAE;AAAA,iBAAMD,OAAO,CAACC,GAAR,CAAY,gBAAZ,CAAN;AAAA,SAHjB;AAIC,QAAA,WAAW,EAAE,KAAKC,UAJnB;AAKC,QAAA,SAAS,EAAEN,gBAAgB,GAAG,CAL/B;AAMC,QAAA,OAAO,EAAE,wBAAQ,SAAR,EAAmB,IAAnB,CANV;AAOC,QAAA,KAAK,EAAE,CACN;AACCO,UAAAA,KAAK,EAAE,QADR;AAECC,UAAAA,SAAS,EAAER,gBAAgB,KAAK,CAFjC;AAGCS,UAAAA,IAAI,EACH,gCAAC,iBAAD,QACC,gCAAC,qBAAD,QACC,gCAAC,gBAAD;AACC,YAAA,KAAK,EAAC,cADP;AAEC,YAAA,WAAW,EAAC;AAFb,YADD,CADD,CAJF;AAaCC,UAAAA,mBAAmB,EAAE;AACpBC,YAAAA,IAAI,EAAE,MADc;AAEpBC,YAAAA,OAAO,EAAE;AAAA,qBAAM,MAAI,CAACX,QAAL,CAAc;AAAED,gBAAAA,gBAAgB,EAAE;AAApB,eAAd,CAAN;AAAA;AAFW;AAbtB,SADM,EAmBN;AACCO,UAAAA,KAAK,EAAE,QADR;AAECC,UAAAA,SAAS,EAAER,gBAAgB,KAAK,CAFjC;AAGCS,UAAAA,IAAI,EACH,gCAAC,iBAAD,QACC,gCAAC,qBAAD,QACC,gCAAC,gBAAD;AAAW,YAAA,KAAK,EAAC;AAAjB,YADD,CADD,CAJF;AAUCC,UAAAA,mBAAmB,EAAE;AACpBC,YAAAA,IAAI,EAAE,QADc;AAEpBC,YAAAA,OAAO,EAAE;AAAA,qBAAMR,OAAO,CAACC,GAAR,CAAY,SAAZ,CAAN;AAAA;AAFW;AAVtB,SAnBM;AAPR,QADD;AA6CA;;;EA5D6BQ,gB;;AA+D/B,IAAMC,OAAO,GAAG,uBAAU,aAAV,EAAyBC,MAAzB,CAAhB;AAEAD,OAAO,CAACE,YAAR,CAAqBC,iBAArB;AAEAH,OAAO,CAACI,GAAR,CAAY,YAAZ,EAA0B;AAAA,SAAM,gCAAC,gBAAD,OAAN;AAAA,CAA1B,EAAsD;AACrDC,EAAAA,GAAG,EAAE;AACJC,IAAAA,IAAI,EAAE;AADF;AADgD,CAAtD","sourcesContent":["// @flow\nimport React, { Component } from 'react'\nimport { storiesOf } from '@storybook/react'\nimport { withKnobs, boolean } from '@storybook/addon-knobs/react'\nimport PagedModal from './PagedModal'\nimport { TextInput, FormLayout, FormLayoutItem } from '../Forms'\n\ntype Props = {}\n\ntype State = {\n\tcurrentPageIndex: number\n}\n\nclass PageModalExample extends Component<Props, State> {\n\tstate = {\n\t\tcurrentPageIndex: 0\n\t}\n\n\thandleBack = () => {\n\t\tthis.setState(prevState => ({\n\t\t\tcurrentPageIndex:\n\t\t\t\tprevState.currentPageIndex > 0 ? prevState.currentPageIndex - 1 : 0\n\t\t}))\n\t}\n\n\trender() {\n\t\tconst { currentPageIndex } = this.state\n\n\t\treturn (\n\t\t\t<PagedModal\n\t\t\t\tisOpen={boolean('isOpen', true)}\n\t\t\t\tonAfterOpen={() => console.log('onAfterOpen')}\n\t\t\t\tonRequestClose={() => console.log('onRequestClose')}\n\t\t\t\tonClickBack={this.handleBack}\n\t\t\t\tcanGoBack={currentPageIndex > 0}\n\t\t\t\tisSmall={boolean('isSmall', true)}\n\t\t\t\tpages={[\n\t\t\t\t\t{\n\t\t\t\t\t\ttitle: 'Page 1',\n\t\t\t\t\t\tisCurrent: currentPageIndex === 0,\n\t\t\t\t\t\tbody: (\n\t\t\t\t\t\t\t<FormLayout>\n\t\t\t\t\t\t\t\t<FormLayoutItem>\n\t\t\t\t\t\t\t\t\t<TextInput\n\t\t\t\t\t\t\t\t\t\tlabel=\"Phone Number\"\n\t\t\t\t\t\t\t\t\t\tplaceholder=\"(555)-555-5555\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</FormLayoutItem>\n\t\t\t\t\t\t\t</FormLayout>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tfooterPrimaryAction: {\n\t\t\t\t\t\t\ttext: 'Next',\n\t\t\t\t\t\t\tonClick: () => this.setState({ currentPageIndex: 1 })\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttitle: 'Page 2',\n\t\t\t\t\t\tisCurrent: currentPageIndex === 1,\n\t\t\t\t\t\tbody: (\n\t\t\t\t\t\t\t<FormLayout>\n\t\t\t\t\t\t\t\t<FormLayoutItem>\n\t\t\t\t\t\t\t\t\t<TextInput label=\"First Name\" />\n\t\t\t\t\t\t\t\t</FormLayoutItem>\n\t\t\t\t\t\t\t</FormLayout>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tfooterPrimaryAction: {\n\t\t\t\t\t\t\ttext: 'Submit',\n\t\t\t\t\t\t\tonClick: () => console.log('Submit!')\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t]}\n\t\t\t/>\n\t\t)\n\t}\n}\n\nconst stories = storiesOf('Paged Modal', module)\n\nstories.addDecorator(withKnobs)\n\nstories.add('Page Modal', () => <PageModalExample />, {\n\tjsx: {\n\t\tskip: 1\n\t}\n})\n"],"file":"PagedModal-story.js"}
|
|
@@ -0,0 +1,84 @@
|
|
|
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 _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
|
+
|
|
14
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
15
|
+
|
|
16
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
17
|
+
|
|
18
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
19
|
+
|
|
20
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
21
|
+
|
|
22
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
23
|
+
|
|
24
|
+
var React = _interopRequireWildcard(require("react"));
|
|
25
|
+
|
|
26
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
27
|
+
|
|
28
|
+
var _Modal = _interopRequireDefault(require("../Modal/Modal"));
|
|
29
|
+
|
|
30
|
+
var PagedModal =
|
|
31
|
+
/*#__PURE__*/
|
|
32
|
+
function (_React$PureComponent) {
|
|
33
|
+
(0, _inherits2["default"])(PagedModal, _React$PureComponent);
|
|
34
|
+
|
|
35
|
+
function PagedModal() {
|
|
36
|
+
(0, _classCallCheck2["default"])(this, PagedModal);
|
|
37
|
+
return (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(PagedModal).apply(this, arguments));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
(0, _createClass2["default"])(PagedModal, [{
|
|
41
|
+
key: "render",
|
|
42
|
+
value: function render() {
|
|
43
|
+
var _this$props = this.props,
|
|
44
|
+
isOpen = _this$props.isOpen,
|
|
45
|
+
isFullHeight = _this$props.isFullHeight,
|
|
46
|
+
size = _this$props.size,
|
|
47
|
+
pages = _this$props.pages,
|
|
48
|
+
onRequestClose = _this$props.onRequestClose,
|
|
49
|
+
canGoBack = _this$props.canGoBack,
|
|
50
|
+
onClickBack = _this$props.onClickBack;
|
|
51
|
+
var currentPage = pages.find(function (page) {
|
|
52
|
+
return page.isCurrent;
|
|
53
|
+
});
|
|
54
|
+
return React.createElement(_Modal["default"], {
|
|
55
|
+
isOpen: isOpen,
|
|
56
|
+
size: size,
|
|
57
|
+
isFullHeight: isFullHeight,
|
|
58
|
+
className: "paged-modal"
|
|
59
|
+
}, React.createElement(_Modal["default"].Header, {
|
|
60
|
+
title: currentPage && currentPage.title || '',
|
|
61
|
+
onRequestClose: onRequestClose,
|
|
62
|
+
onClickBack: canGoBack && onClickBack,
|
|
63
|
+
isPaginated: true
|
|
64
|
+
}), pages.map(function (page, idx) {
|
|
65
|
+
return React.createElement(_Modal["default"].Body, {
|
|
66
|
+
key: "".concat(idx),
|
|
67
|
+
className: (0, _classnames["default"])('paged-modal__page', {
|
|
68
|
+
'paged-modal__page--is-current': page.isCurrent
|
|
69
|
+
})
|
|
70
|
+
}, page.body);
|
|
71
|
+
}), currentPage && currentPage.footerPrimaryAction && React.createElement(_Modal["default"].Footer, {
|
|
72
|
+
primaryAction: currentPage.footerPrimaryAction,
|
|
73
|
+
secondaryAction: currentPage.footerSecondaryAction
|
|
74
|
+
}));
|
|
75
|
+
}
|
|
76
|
+
}]);
|
|
77
|
+
return PagedModal;
|
|
78
|
+
}(React.PureComponent);
|
|
79
|
+
|
|
80
|
+
exports["default"] = PagedModal;
|
|
81
|
+
(0, _defineProperty2["default"])(PagedModal, "defaultProps", {
|
|
82
|
+
size: 'medium'
|
|
83
|
+
});
|
|
84
|
+
//# sourceMappingURL=PagedModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/PagedModal/PagedModal.js"],"names":["PagedModal","props","isOpen","isFullHeight","size","pages","onRequestClose","canGoBack","onClickBack","currentPage","find","page","isCurrent","title","map","idx","body","footerPrimaryAction","footerSecondaryAction","React","PureComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AACA;;IAsCqBA,U;;;;;;;;;;;;6BAKX;AAAA,wBASJ,KAAKC,KATD;AAAA,UAEPC,MAFO,eAEPA,MAFO;AAAA,UAGPC,YAHO,eAGPA,YAHO;AAAA,UAIPC,IAJO,eAIPA,IAJO;AAAA,UAKPC,KALO,eAKPA,KALO;AAAA,UAMPC,cANO,eAMPA,cANO;AAAA,UAOPC,SAPO,eAOPA,SAPO;AAAA,UAQPC,WARO,eAQPA,WARO;AAWR,UAAMC,WAAW,GAAGJ,KAAK,CAACK,IAAN,CAAW,UAAAC,IAAI;AAAA,eAAIA,IAAI,CAACC,SAAT;AAAA,OAAf,CAApB;AAEA,aACC,oBAAC,iBAAD;AACC,QAAA,MAAM,EAAEV,MADT;AAEC,QAAA,IAAI,EAAEE,IAFP;AAGC,QAAA,YAAY,EAAED,YAHf;AAIC,QAAA,SAAS,EAAC;AAJX,SAMC,oBAAC,iBAAD,CAAO,MAAP;AACC,QAAA,KAAK,EAAGM,WAAW,IAAIA,WAAW,CAACI,KAA5B,IAAsC,EAD9C;AAEC,QAAA,cAAc,EAAEP,cAFjB;AAGC,QAAA,WAAW,EAAEC,SAAS,IAAIC,WAH3B;AAIC,QAAA,WAAW;AAJZ,QAND,EAYEH,KAAK,CAACS,GAAN,CAAU,UAACH,IAAD,EAAOI,GAAP;AAAA,eACV,oBAAC,iBAAD,CAAO,IAAP;AACC,UAAA,GAAG,YAAKA,GAAL,CADJ;AAEC,UAAA,SAAS,EAAE,4BAAG,mBAAH,EAAwB;AAClC,6CAAiCJ,IAAI,CAACC;AADJ,WAAxB;AAFZ,WAMED,IAAI,CAACK,IANP,CADU;AAAA,OAAV,CAZF,EAsBEP,WAAW,IAAIA,WAAW,CAACQ,mBAA3B,IACA,oBAAC,iBAAD,CAAO,MAAP;AACC,QAAA,aAAa,EAAER,WAAW,CAACQ,mBAD5B;AAEC,QAAA,eAAe,EAAER,WAAW,CAACS;AAF9B,QAvBF,CADD;AA+BA;;;EAjDsCC,KAAK,CAACC,a;;;iCAAzBpB,U,kBACE;AACrBI,EAAAA,IAAI,EAAE;AADe,C","sourcesContent":["// @flow\nimport * as React from 'react'\nimport cx from 'classnames'\nimport Modal from '../Modal/Modal'\n\nimport type { Props as ModalProps } from '../Modal/Modal'\nimport type { Props as ButtonProps } from '../Button/Button'\n\ntype ModalPageProps = {\n\t/** The title for this page */\n\ttitle: string,\n\n\t/** The modal body for this page */\n\tbody: React.Node,\n\n\t/** The modal footer primary action for this page */\n\tfooterPrimaryAction?: ButtonProps,\n\n\t/** The modal footer secondary action for this page */\n\tfooterSecondaryAction?: ButtonProps,\n\n\t/** Whether this page is currently visible */\n\tisCurrent: boolean\n}\n\ntype Props = {\n\t...ModalProps,\n\n\t/** Callback to close the modal */\n\tonRequestClose: Function,\n\n\t/** Whether the back button should be displayed */\n\tcanGoBack: boolean,\n\n\t/** Function to handle navigating backwards in the modal */\n\tonClickBack?: Function,\n\n\t/** Set true to show the modal */\n\tpages: Array<ModalPageProps>\n}\n\nexport default class PagedModal extends React.PureComponent<Props> {\n\tstatic defaultProps = {\n\t\tsize: 'medium'\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tisOpen,\n\t\t\tisFullHeight,\n\t\t\tsize,\n\t\t\tpages,\n\t\t\tonRequestClose,\n\t\t\tcanGoBack,\n\t\t\tonClickBack\n\t\t} = this.props\n\n\t\tconst currentPage = pages.find(page => page.isCurrent)\n\n\t\treturn (\n\t\t\t<Modal\n\t\t\t\tisOpen={isOpen}\n\t\t\t\tsize={size}\n\t\t\t\tisFullHeight={isFullHeight}\n\t\t\t\tclassName=\"paged-modal\"\n\t\t\t>\n\t\t\t\t<Modal.Header\n\t\t\t\t\ttitle={(currentPage && currentPage.title) || ''}\n\t\t\t\t\tonRequestClose={onRequestClose}\n\t\t\t\t\tonClickBack={canGoBack && onClickBack}\n\t\t\t\t\tisPaginated\n\t\t\t\t/>\n\t\t\t\t{pages.map((page, idx) => (\n\t\t\t\t\t<Modal.Body\n\t\t\t\t\t\tkey={`${idx}`}\n\t\t\t\t\t\tclassName={cx('paged-modal__page', {\n\t\t\t\t\t\t\t'paged-modal__page--is-current': page.isCurrent\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t{page.body}\n\t\t\t\t\t</Modal.Body>\n\t\t\t\t))}\n\t\t\t\t{currentPage && currentPage.footerPrimaryAction && (\n\t\t\t\t\t<Modal.Footer\n\t\t\t\t\t\tprimaryAction={currentPage.footerPrimaryAction}\n\t\t\t\t\t\tsecondaryAction={currentPage.footerSecondaryAction}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</Modal>\n\t\t)\n\t}\n}\n"],"file":"PagedModal.js"}
|
|
@@ -0,0 +1,35 @@
|
|
|
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 _Pagination = _interopRequireDefault(require("./Pagination"));
|
|
12
|
+
|
|
13
|
+
var stories = (0, _react2.storiesOf)('Pagination', module);
|
|
14
|
+
stories.addDecorator(_react3.withKnobs);
|
|
15
|
+
stories.add('Pagination', function () {
|
|
16
|
+
return _react["default"].createElement(_Pagination["default"], {
|
|
17
|
+
currentPage: (0, _react3.number)('currentPage', 0),
|
|
18
|
+
totalPages: (0, _react3.number)('totalPages', 100),
|
|
19
|
+
showPages: (0, _react3["boolean"])('showPages', false),
|
|
20
|
+
showJump: (0, _react3["boolean"])('showJump', false),
|
|
21
|
+
onClickNext: function onClickNext() {
|
|
22
|
+
return console.log('You clicked next');
|
|
23
|
+
},
|
|
24
|
+
onClickBack: function onClickBack() {
|
|
25
|
+
return console.log('You clicked back');
|
|
26
|
+
},
|
|
27
|
+
onPageButtonClick: function onPageButtonClick(page) {
|
|
28
|
+
return console.log('You clicked ', page);
|
|
29
|
+
},
|
|
30
|
+
onJump: function onJump(value) {
|
|
31
|
+
return console.log('Use jump: ', value);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=Pagination-story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Pagination/Pagination-story.js"],"names":["stories","module","addDecorator","withKnobs","add","console","log","page","value"],"mappings":";;;;AACA;;AACA;;AACA;;AACA;;AAEA,IAAMA,OAAO,GAAG,uBAAU,YAAV,EAAwBC,MAAxB,CAAhB;AAEAD,OAAO,CAACE,YAAR,CAAqBC,iBAArB;AAEAH,OAAO,CAACI,GAAR,CAAY,YAAZ,EAA0B;AAAA,SACzB,gCAAC,sBAAD;AACC,IAAA,WAAW,EAAE,oBAAO,aAAP,EAAsB,CAAtB,CADd;AAEC,IAAA,UAAU,EAAE,oBAAO,YAAP,EAAqB,GAArB,CAFb;AAGC,IAAA,SAAS,EAAE,wBAAQ,WAAR,EAAqB,KAArB,CAHZ;AAIC,IAAA,QAAQ,EAAE,wBAAQ,UAAR,EAAoB,KAApB,CAJX;AAKC,IAAA,WAAW,EAAE;AAAA,aAAMC,OAAO,CAACC,GAAR,CAAY,kBAAZ,CAAN;AAAA,KALd;AAMC,IAAA,WAAW,EAAE;AAAA,aAAMD,OAAO,CAACC,GAAR,CAAY,kBAAZ,CAAN;AAAA,KANd;AAOC,IAAA,iBAAiB,EAAE,2BAAAC,IAAI;AAAA,aAAIF,OAAO,CAACC,GAAR,CAAY,cAAZ,EAA4BC,IAA5B,CAAJ;AAAA,KAPxB;AAQC,IAAA,MAAM,EAAE,gBAAAC,KAAK;AAAA,aAAIH,OAAO,CAACC,GAAR,CAAY,YAAZ,EAA0BE,KAA1B,CAAJ;AAAA;AARd,IADyB;AAAA,CAA1B","sourcesContent":["// @flow\nimport React from 'react'\nimport { storiesOf } from '@storybook/react'\nimport { withKnobs, boolean, number } from '@storybook/addon-knobs/react'\nimport Pagination from './Pagination'\n\nconst stories = storiesOf('Pagination', module)\n\nstories.addDecorator(withKnobs)\n\nstories.add('Pagination', () => (\n\t<Pagination\n\t\tcurrentPage={number('currentPage', 0)}\n\t\ttotalPages={number('totalPages', 100)}\n\t\tshowPages={boolean('showPages', false)}\n\t\tshowJump={boolean('showJump', false)}\n\t\tonClickNext={() => console.log('You clicked next')}\n\t\tonClickBack={() => console.log('You clicked back')}\n\t\tonPageButtonClick={page => console.log('You clicked ', page)}\n\t\tonJump={value => console.log('Use jump: ', value)}\n\t/>\n))\n"],"file":"Pagination-story.js"}
|
|
@@ -0,0 +1,157 @@
|
|
|
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 _react = _interopRequireDefault(require("react"));
|
|
13
|
+
|
|
14
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
+
|
|
16
|
+
var _Button = _interopRequireDefault(require("../Button/Button"));
|
|
17
|
+
|
|
18
|
+
var _Text = _interopRequireWildcard(require("../Text/Text"));
|
|
19
|
+
|
|
20
|
+
var _FormPartials = require("../Forms/FormPartials");
|
|
21
|
+
|
|
22
|
+
var ArrowNext = function ArrowNext(props) {
|
|
23
|
+
return _react["default"].createElement("svg", props, _react["default"].createElement("path", {
|
|
24
|
+
fillRule: "evenodd",
|
|
25
|
+
clipRule: "evenodd",
|
|
26
|
+
d: "M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8-8-8z"
|
|
27
|
+
}));
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
ArrowNext.defaultProps = {
|
|
31
|
+
width: "24",
|
|
32
|
+
height: "24",
|
|
33
|
+
viewBox: "0 0 24 24",
|
|
34
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
var ArrowBack = function ArrowBack(props) {
|
|
38
|
+
return _react["default"].createElement("svg", props, _react["default"].createElement("path", {
|
|
39
|
+
fillRule: "evenodd",
|
|
40
|
+
clipRule: "evenodd",
|
|
41
|
+
d: "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"
|
|
42
|
+
}));
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
ArrowBack.defaultProps = {
|
|
46
|
+
width: "24",
|
|
47
|
+
height: "24",
|
|
48
|
+
viewBox: "0 0 24 24",
|
|
49
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
var Pagination = function Pagination(props) {
|
|
53
|
+
var currentPage = props.currentPage,
|
|
54
|
+
totalPages = props.totalPages,
|
|
55
|
+
showPages = props.showPages,
|
|
56
|
+
showJump = props.showJump,
|
|
57
|
+
onClickNext = props.onClickNext,
|
|
58
|
+
onClickBack = props.onClickBack,
|
|
59
|
+
onPageButtonClick = props.onPageButtonClick,
|
|
60
|
+
onJump = props.onJump,
|
|
61
|
+
isSimple = props.isSimple;
|
|
62
|
+
var pagesArray = [];
|
|
63
|
+
var displayPages = [];
|
|
64
|
+
|
|
65
|
+
for (var i = 0; i < totalPages; i++) {
|
|
66
|
+
pagesArray.push(i);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (currentPage <= 2 || totalPages - currentPage <= 2) {
|
|
70
|
+
displayPages = pagesArray.filter(function (page) {
|
|
71
|
+
return page === 0 || page === 1 || page === 2 || page === totalPages - 1 || page === totalPages - 2 || page === totalPages - 3 || page === currentPage;
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
if (totalPages > 6) {
|
|
75
|
+
displayPages.splice(3, 0, {
|
|
76
|
+
text: '…'
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
} else {
|
|
80
|
+
displayPages = pagesArray.filter(function (page) {
|
|
81
|
+
return page === 0 || page === totalPages - 1 || page === currentPage || page === currentPage + 1 || page === currentPage - 1;
|
|
82
|
+
});
|
|
83
|
+
displayPages.splice(1, 0, {
|
|
84
|
+
text: '…'
|
|
85
|
+
});
|
|
86
|
+
displayPages.splice(displayPages.length - 1, 0, {
|
|
87
|
+
text: '…'
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
var kind = isSimple ? 'simple' : 'secondary';
|
|
92
|
+
return _react["default"].createElement("div", {
|
|
93
|
+
className: (0, _classnames["default"])('pagination-wrapper', {
|
|
94
|
+
'pagination-wrapper-minimal': !showPages
|
|
95
|
+
})
|
|
96
|
+
}, _react["default"].createElement(_Button["default"], {
|
|
97
|
+
kind: kind,
|
|
98
|
+
onClick: onClickBack,
|
|
99
|
+
isSmall: true,
|
|
100
|
+
className: "pagination__btn",
|
|
101
|
+
icon: {
|
|
102
|
+
customIcon: ArrowBack
|
|
103
|
+
},
|
|
104
|
+
disabled: currentPage === 0
|
|
105
|
+
}), showPages && onPageButtonClick && displayPages.map(function (page, idx) {
|
|
106
|
+
if (page.text === '…') {
|
|
107
|
+
return _react["default"].createElement(_Text["default"], {
|
|
108
|
+
key: idx,
|
|
109
|
+
className: "pagination__page-ellipse"
|
|
110
|
+
}, _react["default"].createElement(_Text.Span, null, "\u2026"));
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return _react["default"].createElement(_Button["default"], {
|
|
114
|
+
key: idx,
|
|
115
|
+
onClick: function onClick() {
|
|
116
|
+
return onPageButtonClick(page);
|
|
117
|
+
},
|
|
118
|
+
kind: currentPage === page ? 'simple' : '',
|
|
119
|
+
text: (page + 1).toString(),
|
|
120
|
+
isSmall: true,
|
|
121
|
+
className: "pagination__page-btn"
|
|
122
|
+
});
|
|
123
|
+
}), _react["default"].createElement(_Button["default"], {
|
|
124
|
+
kind: kind,
|
|
125
|
+
onClick: onClickNext,
|
|
126
|
+
isSmall: true,
|
|
127
|
+
className: "pagination__btn",
|
|
128
|
+
icon: {
|
|
129
|
+
customIcon: ArrowNext
|
|
130
|
+
},
|
|
131
|
+
disabled: currentPage >= totalPages - 1
|
|
132
|
+
}), showJump && onJump && _react["default"].createElement("form", {
|
|
133
|
+
className: "pagination__jump-wrapper",
|
|
134
|
+
onSubmit: function onSubmit(e) {
|
|
135
|
+
e.preventDefault();
|
|
136
|
+
|
|
137
|
+
for (var _i = 0; _i < e.currentTarget.elements.length; _i++) {
|
|
138
|
+
if (e.currentTarget.elements[_i].name === 'jump') {
|
|
139
|
+
onJump(e.currentTarget.elements[_i].value || e.currentTarget.elements[_i].placeholder);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}, _react["default"].createElement(_Text.Span, {
|
|
144
|
+
className: "pagination__jump-text"
|
|
145
|
+
}, "Jump:\xA0"), _react["default"].createElement(_FormPartials.InputInner, {
|
|
146
|
+
name: "jump",
|
|
147
|
+
autoComplete: "off",
|
|
148
|
+
placeholder: currentPage,
|
|
149
|
+
onBlur: function onBlur(e) {
|
|
150
|
+
onJump(e.currentTarget.value || e.currentTarget.placeholder);
|
|
151
|
+
}
|
|
152
|
+
})));
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
var _default = Pagination;
|
|
156
|
+
exports["default"] = _default;
|
|
157
|
+
//# sourceMappingURL=Pagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Pagination/Pagination.js"],"names":["ArrowNext","ArrowBack","Pagination","props","currentPage","totalPages","showPages","showJump","onClickNext","onClickBack","onPageButtonClick","onJump","isSimple","pagesArray","displayPages","i","push","filter","page","splice","text","length","kind","customIcon","map","idx","toString","e","preventDefault","currentTarget","elements","name","value","placeholder"],"mappings":"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","sourcesContent":["// @flow\nimport React from 'react'\nimport cx from 'classnames'\nimport Button from '../Button/Button'\nimport Text, { Span } from '../Text/Text'\nimport { InputInner } from '../Forms/FormPartials'\nimport ArrowNext from '../../../static/assets/icons/ic_arrow_forward.svg'\nimport ArrowBack from '../../../static/assets/icons/ic_arrow_back.svg'\n\nexport type Props = {\n\t/** The current page */\n\tcurrentPage: number,\n\n\t/** Total pages */\n\ttotalPages: number,\n\n\t/** Go forward one page */\n\tonClickNext: Function,\n\n\t/** Go back one page */\n\tonClickBack: Function,\n\n\t/** Navigate to the clicked/tapped page */\n\tonPageButtonClick?: Function,\n\n\t/** Navigate throught the jump input */\n\tonJump?: Function,\n\n\t/** Set true to display pages between arrows */\n\tshowPages?: boolean,\n\n\t/** Set true to show the jump input */\n\tshowJump?: boolean,\n\n\t/** Set true to use simple buttons */\n\tisSimple?: boolean\n}\n\nconst Pagination = (props: Props) => {\n\tconst {\n\t\tcurrentPage,\n\t\ttotalPages,\n\t\tshowPages,\n\t\tshowJump,\n\t\tonClickNext,\n\t\tonClickBack,\n\t\tonPageButtonClick,\n\t\tonJump,\n\t\tisSimple\n\t} = props\n\tconst pagesArray = []\n\tlet displayPages = []\n\tfor (let i = 0; i < totalPages; i++) {\n\t\tpagesArray.push(i)\n\t}\n\tif (currentPage <= 2 || totalPages - currentPage <= 2) {\n\t\tdisplayPages = pagesArray.filter(\n\t\t\tpage =>\n\t\t\t\tpage === 0 ||\n\t\t\t\tpage === 1 ||\n\t\t\t\tpage === 2 ||\n\t\t\t\tpage === totalPages - 1 ||\n\t\t\t\tpage === totalPages - 2 ||\n\t\t\t\tpage === totalPages - 3 ||\n\t\t\t\tpage === currentPage\n\t\t)\n\t\tif (totalPages > 6) {\n\t\t\tdisplayPages.splice(3, 0, { text: '…' })\n\t\t}\n\t} else {\n\t\tdisplayPages = pagesArray.filter(\n\t\t\tpage =>\n\t\t\t\tpage === 0 ||\n\t\t\t\tpage === totalPages - 1 ||\n\t\t\t\tpage === currentPage ||\n\t\t\t\tpage === currentPage + 1 ||\n\t\t\t\tpage === currentPage - 1\n\t\t)\n\t\tdisplayPages.splice(1, 0, { text: '…' })\n\t\tdisplayPages.splice(displayPages.length - 1, 0, { text: '…' })\n\t}\n\n\tconst kind = isSimple ? 'simple' : 'secondary'\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cx('pagination-wrapper', {\n\t\t\t\t'pagination-wrapper-minimal': !showPages\n\t\t\t})}\n\t\t>\n\t\t\t<Button\n\t\t\t\tkind={kind}\n\t\t\t\tonClick={onClickBack}\n\t\t\t\tisSmall\n\t\t\t\tclassName=\"pagination__btn\"\n\t\t\t\ticon={{ customIcon: ArrowBack }}\n\t\t\t\tdisabled={currentPage === 0}\n\t\t\t/>\n\t\t\t{showPages &&\n\t\t\t\tonPageButtonClick &&\n\t\t\t\tdisplayPages.map((page, idx) => {\n\t\t\t\t\tif (page.text === '…') {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<Text key={idx} className=\"pagination__page-ellipse\">\n\t\t\t\t\t\t\t\t<Span>…</Span>\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tkey={idx}\n\t\t\t\t\t\t\tonClick={() => onPageButtonClick(page)}\n\t\t\t\t\t\t\tkind={currentPage === page ? 'simple' : ''}\n\t\t\t\t\t\t\ttext={(page + 1).toString()}\n\t\t\t\t\t\t\tisSmall\n\t\t\t\t\t\t\tclassName=\"pagination__page-btn\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t)\n\t\t\t\t})}\n\t\t\t<Button\n\t\t\t\tkind={kind}\n\t\t\t\tonClick={onClickNext}\n\t\t\t\tisSmall\n\t\t\t\tclassName=\"pagination__btn\"\n\t\t\t\ticon={{ customIcon: ArrowNext }}\n\t\t\t\tdisabled={currentPage >= totalPages - 1}\n\t\t\t/>\n\t\t\t{showJump && onJump && (\n\t\t\t\t<form\n\t\t\t\t\tclassName=\"pagination__jump-wrapper\"\n\t\t\t\t\tonSubmit={e => {\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\tfor (let i = 0; i < e.currentTarget.elements.length; i++) {\n\t\t\t\t\t\t\tif (e.currentTarget.elements[i].name === 'jump') {\n\t\t\t\t\t\t\t\tonJump(\n\t\t\t\t\t\t\t\t\te.currentTarget.elements[i].value ||\n\t\t\t\t\t\t\t\t\t\te.currentTarget.elements[i].placeholder\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<Span className=\"pagination__jump-text\">Jump: </Span>\n\t\t\t\t\t<InputInner\n\t\t\t\t\t\tname=\"jump\"\n\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\tplaceholder={currentPage}\n\t\t\t\t\t\tonBlur={e => {\n\t\t\t\t\t\t\tonJump(e.currentTarget.value || e.currentTarget.placeholder)\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t</form>\n\t\t\t)}\n\t\t</div>\n\t)\n}\n\nexport default Pagination\n"],"file":"Pagination.js"}
|