@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,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
+
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
|
|
9
|
+
var _react2 = require("@storybook/react");
|
|
10
|
+
|
|
11
|
+
var _react3 = require("@storybook/addon-knobs/react");
|
|
12
|
+
|
|
13
|
+
var _faker = _interopRequireDefault(require("faker"));
|
|
14
|
+
|
|
15
|
+
var _index = _interopRequireWildcard(require("./index"));
|
|
16
|
+
|
|
17
|
+
var _Card = _interopRequireDefault(require("../Card/Card"));
|
|
18
|
+
|
|
19
|
+
var stories = (0, _react2.storiesOf)('Layout', module);
|
|
20
|
+
stories.addDecorator(_react3.withKnobs);
|
|
21
|
+
|
|
22
|
+
var generateCard = function generateCard() {
|
|
23
|
+
return _react["default"].createElement(_Card["default"], null, _react["default"].createElement(_Card["default"].Header, {
|
|
24
|
+
title: _faker["default"].lorem.words(3)
|
|
25
|
+
}), _react["default"].createElement(_Card["default"].Body, null, _faker["default"].lorem.words(Math.floor(Math.random() * 25 + 5))));
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
stories.add('Spacing Utilities', function () {
|
|
29
|
+
var prefixSelect = (0, _react3.select)('side', ['all', 'horizontal', 'vertical', 'top', 'right', 'bottom', 'left'], 'all');
|
|
30
|
+
var prefixes = {
|
|
31
|
+
all: '',
|
|
32
|
+
horizontal: 'x',
|
|
33
|
+
vertical: 'y',
|
|
34
|
+
top: 't',
|
|
35
|
+
right: 'r',
|
|
36
|
+
bottom: 'b',
|
|
37
|
+
left: 'l'
|
|
38
|
+
};
|
|
39
|
+
return _react["default"].createElement("div", {
|
|
40
|
+
style: {
|
|
41
|
+
backgroundColor: 'rgba(49,95,204,0.5)'
|
|
42
|
+
}
|
|
43
|
+
}, _react["default"].createElement("div", {
|
|
44
|
+
className: "p".concat(prefixes[prefixSelect], "-").concat((0, _react3.select)('spacing', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], 1)),
|
|
45
|
+
style: {
|
|
46
|
+
width: 'auto',
|
|
47
|
+
backgroundColor: 'rgba(49,95,204,0.5)'
|
|
48
|
+
}
|
|
49
|
+
}, _react["default"].createElement("p", {
|
|
50
|
+
style: {
|
|
51
|
+
backgroundColor: '#fff'
|
|
52
|
+
}
|
|
53
|
+
}, "This is content")));
|
|
54
|
+
}).add('Container Classes', function () {
|
|
55
|
+
return _react["default"].createElement("div", {
|
|
56
|
+
className: "p-4",
|
|
57
|
+
style: {
|
|
58
|
+
backgroundColor: 'rgba(49,95,204,0.5)'
|
|
59
|
+
}
|
|
60
|
+
}, _react["default"].createElement("div", {
|
|
61
|
+
className: "container--".concat((0, _react3.select)('container class', ['base', 'tight', 'wide'], 'base')),
|
|
62
|
+
style: {
|
|
63
|
+
backgroundColor: '#fff'
|
|
64
|
+
}
|
|
65
|
+
}, _react["default"].createElement("p", null, "This is the content")));
|
|
66
|
+
}).add('Primary Layout', function () {
|
|
67
|
+
return _react["default"].createElement(_index["default"], null, _react["default"].createElement(_index.LayoutSection, null, generateCard()));
|
|
68
|
+
}).add('Two Column Layout', function () {
|
|
69
|
+
return _react["default"].createElement(_index["default"], null, _react["default"].createElement(_index.LayoutSection, {
|
|
70
|
+
isSecondary: true
|
|
71
|
+
}, generateCard()), _react["default"].createElement(_index.LayoutSection, {
|
|
72
|
+
isSecondary: true
|
|
73
|
+
}, generateCard()));
|
|
74
|
+
}).add('Two Column Primary & Secondary Layout', function () {
|
|
75
|
+
return _react["default"].createElement(_index["default"], null, _react["default"].createElement(_index.LayoutSection, null, generateCard()), _react["default"].createElement(_index.LayoutSection, {
|
|
76
|
+
isSecondary: true
|
|
77
|
+
}, generateCard()));
|
|
78
|
+
}).add('Tight Layout', function () {
|
|
79
|
+
return _react["default"].createElement(_index["default"], {
|
|
80
|
+
width: "tight"
|
|
81
|
+
}, _react["default"].createElement(_index.LayoutSection, null, generateCard()));
|
|
82
|
+
}).add('Wide Layout', function () {
|
|
83
|
+
return _react["default"].createElement(_index["default"], {
|
|
84
|
+
width: "wide"
|
|
85
|
+
}, _react["default"].createElement(_index.LayoutSection, null, generateCard()));
|
|
86
|
+
}).add('Full-Width Layout', function () {
|
|
87
|
+
return _react["default"].createElement(_index["default"], {
|
|
88
|
+
width: "full-width"
|
|
89
|
+
}, _react["default"].createElement(_index.LayoutSection, null, generateCard()));
|
|
90
|
+
}).add('Full-Bleed Layout', function () {
|
|
91
|
+
return _react["default"].createElement(_index["default"], {
|
|
92
|
+
width: "full-width",
|
|
93
|
+
isFullBleed: true
|
|
94
|
+
}, _react["default"].createElement(_index.LayoutSection, null, generateCard()));
|
|
95
|
+
}).add('Very dense full-width layout', function () {
|
|
96
|
+
return _react["default"].createElement(_index["default"], {
|
|
97
|
+
width: "full-width"
|
|
98
|
+
}, _react["default"].createElement(_index.LayoutSection, {
|
|
99
|
+
isSecondary: true
|
|
100
|
+
}, generateCard()), _react["default"].createElement(_index.LayoutSection, {
|
|
101
|
+
isSecondary: true
|
|
102
|
+
}, generateCard()), _react["default"].createElement(_index.LayoutSection, {
|
|
103
|
+
isSecondary: true
|
|
104
|
+
}, generateCard()), _react["default"].createElement(_index.LayoutSection, {
|
|
105
|
+
isSecondary: true
|
|
106
|
+
}, generateCard()), _react["default"].createElement(_index.LayoutSection, {
|
|
107
|
+
isSecondary: true
|
|
108
|
+
}, generateCard()), _react["default"].createElement(_index.LayoutSection, {
|
|
109
|
+
isSecondary: true
|
|
110
|
+
}, generateCard()), _react["default"].createElement(_index.LayoutSection, {
|
|
111
|
+
isSecondary: true
|
|
112
|
+
}, generateCard()), _react["default"].createElement(_index.LayoutSection, {
|
|
113
|
+
isSecondary: true
|
|
114
|
+
}, generateCard()), _react["default"].createElement(_index.LayoutSection, {
|
|
115
|
+
isSecondary: true
|
|
116
|
+
}, generateCard()), _react["default"].createElement(_index.LayoutSection, {
|
|
117
|
+
isSecondary: true
|
|
118
|
+
}, generateCard()), _react["default"].createElement(_index.LayoutSection, {
|
|
119
|
+
isSecondary: true
|
|
120
|
+
}, generateCard()), _react["default"].createElement(_index.LayoutSection, {
|
|
121
|
+
isSecondary: true
|
|
122
|
+
}, generateCard()), _react["default"].createElement(_index.LayoutSection, {
|
|
123
|
+
isSecondary: true
|
|
124
|
+
}, generateCard()), _react["default"].createElement(_index.LayoutSection, {
|
|
125
|
+
isSecondary: true
|
|
126
|
+
}, generateCard()));
|
|
127
|
+
});
|
|
128
|
+
//# sourceMappingURL=Layout-story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Layout/Layout-story.js"],"names":["stories","module","addDecorator","withKnobs","generateCard","faker","lorem","words","Math","floor","random","add","prefixSelect","prefixes","all","horizontal","vertical","top","right","bottom","left","backgroundColor","width"],"mappings":";;;;;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA,IAAMA,OAAO,GAAG,uBAAU,QAAV,EAAoBC,MAApB,CAAhB;AAEAD,OAAO,CAACE,YAAR,CAAqBC,iBAArB;;AAEA,IAAMC,YAAY,GAAG,SAAfA,YAAe;AAAA,SACpB,gCAAC,gBAAD,QACC,gCAAC,gBAAD,CAAM,MAAN;AAAa,IAAA,KAAK,EAAEC,kBAAMC,KAAN,CAAYC,KAAZ,CAAkB,CAA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CAAC,oBAAD;AAAe,IAAA,WAAW;AAA1B,KAA4BA,YAAY,EAAxC,CAXD,EAYC,gCAAC,oBAAD;AAAe,IAAA,WAAW;AAA1B,KAA4BA,YAAY,EAAxC,CAZD,EAaC,gCAAC,oBAAD;AAAe,IAAA,WAAW;AAA1B,KAA4BA,YAAY,EAAxC,CAbD,EAcC,gCAAC,oBAAD;AAAe,IAAA,WAAW;AAA1B,KAA4BA,YAAY,EAAxC,CAdD,CADoC;AAAA,CAlFtC","sourcesContent":["// @flow\nimport React from 'react'\nimport { storiesOf } from '@storybook/react'\nimport { select, withKnobs } from '@storybook/addon-knobs/react'\nimport faker from 'faker'\n\nimport Layout, { LayoutSection } from './index'\nimport Card from '../Card/Card'\nconst stories = storiesOf('Layout', module)\n\nstories.addDecorator(withKnobs)\n\nconst generateCard = () => (\n\t<Card>\n\t\t<Card.Header title={faker.lorem.words(3)} />\n\t\t<Card.Body>\n\t\t\t{faker.lorem.words(Math.floor(Math.random() * 25 + 5))}\n\t\t</Card.Body>\n\t</Card>\n)\n\nstories\n\t.add('Spacing Utilities', () => {\n\t\tconst prefixSelect = select(\n\t\t\t'side',\n\t\t\t['all', 'horizontal', 'vertical', 'top', 'right', 'bottom', 'left'],\n\t\t\t'all'\n\t\t)\n\t\tconst prefixes = {\n\t\t\tall: '',\n\t\t\thorizontal: 'x',\n\t\t\tvertical: 'y',\n\t\t\ttop: 't',\n\t\t\tright: 'r',\n\t\t\tbottom: 'b',\n\t\t\tleft: 'l'\n\t\t}\n\t\treturn (\n\t\t\t<div style={{ backgroundColor: 'rgba(49,95,204,0.5)' }}>\n\t\t\t\t<div\n\t\t\t\t\tclassName={`p${prefixes[prefixSelect]}-${select(\n\t\t\t\t\t\t'spacing',\n\t\t\t\t\t\t[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],\n\t\t\t\t\t\t1\n\t\t\t\t\t)}`}\n\t\t\t\t\tstyle={{ width: 'auto', backgroundColor: 'rgba(49,95,204,0.5)' }}\n\t\t\t\t>\n\t\t\t\t\t<p style={{ backgroundColor: '#fff' }}>This is content</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t)\n\t})\n\t.add('Container Classes', () => (\n\t\t<div className=\"p-4\" style={{ backgroundColor: 'rgba(49,95,204,0.5)' }}>\n\t\t\t<div\n\t\t\t\tclassName={`container--${select(\n\t\t\t\t\t'container class',\n\t\t\t\t\t['base', 'tight', 'wide'],\n\t\t\t\t\t'base'\n\t\t\t\t)}`}\n\t\t\t\tstyle={{ backgroundColor: '#fff' }}\n\t\t\t>\n\t\t\t\t<p>This is the content</p>\n\t\t\t</div>\n\t\t</div>\n\t))\n\t.add('Primary Layout', () => (\n\t\t<Layout>\n\t\t\t<LayoutSection>{generateCard()}</LayoutSection>\n\t\t</Layout>\n\t))\n\t.add('Two Column Layout', () => (\n\t\t<Layout>\n\t\t\t<LayoutSection isSecondary>{generateCard()}</LayoutSection>\n\t\t\t<LayoutSection isSecondary>{generateCard()}</LayoutSection>\n\t\t</Layout>\n\t))\n\t.add('Two Column Primary & Secondary Layout', () => (\n\t\t<Layout>\n\t\t\t<LayoutSection>{generateCard()}</LayoutSection>\n\t\t\t<LayoutSection isSecondary>{generateCard()}</LayoutSection>\n\t\t</Layout>\n\t))\n\t.add('Tight Layout', () => (\n\t\t<Layout width=\"tight\">\n\t\t\t<LayoutSection>{generateCard()}</LayoutSection>\n\t\t</Layout>\n\t))\n\t.add('Wide Layout', () => (\n\t\t<Layout width=\"wide\">\n\t\t\t<LayoutSection>{generateCard()}</LayoutSection>\n\t\t</Layout>\n\t))\n\t.add('Full-Width Layout', () => (\n\t\t<Layout width=\"full-width\">\n\t\t\t<LayoutSection>{generateCard()}</LayoutSection>\n\t\t</Layout>\n\t))\n\t.add('Full-Bleed Layout', () => (\n\t\t<Layout width=\"full-width\" isFullBleed>\n\t\t\t<LayoutSection>{generateCard()}</LayoutSection>\n\t\t</Layout>\n\t))\n\t.add('Very dense full-width layout', () => (\n\t\t<Layout width=\"full-width\">\n\t\t\t<LayoutSection isSecondary>{generateCard()}</LayoutSection>\n\t\t\t<LayoutSection isSecondary>{generateCard()}</LayoutSection>\n\t\t\t<LayoutSection isSecondary>{generateCard()}</LayoutSection>\n\t\t\t<LayoutSection isSecondary>{generateCard()}</LayoutSection>\n\t\t\t<LayoutSection isSecondary>{generateCard()}</LayoutSection>\n\t\t\t<LayoutSection isSecondary>{generateCard()}</LayoutSection>\n\t\t\t<LayoutSection isSecondary>{generateCard()}</LayoutSection>\n\t\t\t<LayoutSection isSecondary>{generateCard()}</LayoutSection>\n\t\t\t<LayoutSection isSecondary>{generateCard()}</LayoutSection>\n\t\t\t<LayoutSection isSecondary>{generateCard()}</LayoutSection>\n\t\t\t<LayoutSection isSecondary>{generateCard()}</LayoutSection>\n\t\t\t<LayoutSection isSecondary>{generateCard()}</LayoutSection>\n\t\t\t<LayoutSection isSecondary>{generateCard()}</LayoutSection>\n\t\t\t<LayoutSection isSecondary>{generateCard()}</LayoutSection>\n\t\t</Layout>\n\t))\n"],"file":"Layout-story.js"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports["default"] = void 0;
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
|
|
14
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
+
|
|
16
|
+
var _LayoutSection = _interopRequireDefault(require("./components/LayoutSection/LayoutSection"));
|
|
17
|
+
|
|
18
|
+
var Layout = function Layout(props) {
|
|
19
|
+
var children = props.children,
|
|
20
|
+
isCentered = props.isCentered,
|
|
21
|
+
isFullBleed = props.isFullBleed,
|
|
22
|
+
width = props.width,
|
|
23
|
+
className = props.className;
|
|
24
|
+
return _react["default"].createElement("div", {
|
|
25
|
+
className: (0, _classnames["default"])('layout', className, {
|
|
26
|
+
'layout--centered': isCentered,
|
|
27
|
+
'layout--wide': width === 'wide',
|
|
28
|
+
'layout--tight': width === 'tight',
|
|
29
|
+
'layout--full-width': width === 'full-width',
|
|
30
|
+
'layout--full-bleed': isFullBleed
|
|
31
|
+
})
|
|
32
|
+
}, children);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
Layout.Section = _LayoutSection["default"];
|
|
36
|
+
Layout.defaultProps = {
|
|
37
|
+
isCentered: false,
|
|
38
|
+
width: 'base',
|
|
39
|
+
isFullBleed: false
|
|
40
|
+
};
|
|
41
|
+
var _default = Layout;
|
|
42
|
+
exports["default"] = _default;
|
|
43
|
+
//# sourceMappingURL=Layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Layout/Layout.js"],"names":["Layout","props","children","isCentered","isFullBleed","width","className","Section","LayoutSection","defaultProps"],"mappings":";;;;;;;;;;;AACA;;AACA;;AACA;;AAmBA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD,EAAwB;AAAA,MAC9BC,QAD8B,GAC0BD,KAD1B,CAC9BC,QAD8B;AAAA,MACpBC,UADoB,GAC0BF,KAD1B,CACpBE,UADoB;AAAA,MACRC,WADQ,GAC0BH,KAD1B,CACRG,WADQ;AAAA,MACKC,KADL,GAC0BJ,KAD1B,CACKI,KADL;AAAA,MACYC,SADZ,GAC0BL,KAD1B,CACYK,SADZ;AAGtC,SACC;AACC,IAAA,SAAS,EAAE,4BAAG,QAAH,EAAaA,SAAb,EAAwB;AAClC,0BAAoBH,UADc;AAElC,sBAAgBE,KAAK,KAAK,MAFQ;AAGlC,uBAAiBA,KAAK,KAAK,OAHO;AAIlC,4BAAsBA,KAAK,KAAK,YAJE;AAKlC,4BAAsBD;AALY,KAAxB;AADZ,KASEF,QATF,CADD;AAaA,CAhBD;;AAkBAF,MAAM,CAACO,OAAP,GAAiBC,yBAAjB;AAEAR,MAAM,CAACS,YAAP,GAAsB;AACrBN,EAAAA,UAAU,EAAE,KADS;AAErBE,EAAAA,KAAK,EAAE,MAFc;AAGrBD,EAAAA,WAAW,EAAE;AAHQ,CAAtB;eAMeJ,M","sourcesContent":["// @flow\nimport React, { Node } from 'react'\nimport cx from 'classnames'\nimport LayoutSection from './components/LayoutSection/LayoutSection'\n\nexport type LayoutProps = {\n\t/** Contents of the Layout. Should be LayoutSection components */\n\tchildren?: Node,\n\n\t/** Set true to center align layout content. */\n\tisCentered?: boolean,\n\n\t/** Set true to remove horizontal padding from layout. */\n\tisFullBleed?: boolean,\n\n\t/** Sets the width of the layout */\n\twidth?: 'base' | 'tight' | 'wide' | 'full-width',\n\n\t/** any classes applied to the div */\n\tclassName?: string\n}\n\nconst Layout = (props: LayoutProps) => {\n\tconst { children, isCentered, isFullBleed, width, className } = props\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cx('layout', className, {\n\t\t\t\t'layout--centered': isCentered,\n\t\t\t\t'layout--wide': width === 'wide',\n\t\t\t\t'layout--tight': width === 'tight',\n\t\t\t\t'layout--full-width': width === 'full-width',\n\t\t\t\t'layout--full-bleed': isFullBleed\n\t\t\t})}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t)\n}\n\nLayout.Section = LayoutSection\n\nLayout.defaultProps = {\n\tisCentered: false,\n\twidth: 'base',\n\tisFullBleed: false\n}\n\nexport default Layout\n"],"file":"Layout.js"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports["default"] = void 0;
|
|
11
|
+
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
14
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
|
+
|
|
16
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
+
|
|
18
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
|
+
|
|
20
|
+
var LayoutSection = function LayoutSection(props) {
|
|
21
|
+
var className = props.className,
|
|
22
|
+
isSecondary = props.isSecondary,
|
|
23
|
+
children = props.children,
|
|
24
|
+
rest = (0, _objectWithoutProperties2["default"])(props, ["className", "isSecondary", "children"]);
|
|
25
|
+
return _react["default"].createElement("div", (0, _extends2["default"])({
|
|
26
|
+
className: (0, _classnames["default"])('layout__section', className, {
|
|
27
|
+
'layout__section--secondary': isSecondary
|
|
28
|
+
})
|
|
29
|
+
}, rest), children);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
LayoutSection.displayName = 'Layout.Section';
|
|
33
|
+
LayoutSection.defaultProps = {
|
|
34
|
+
isSecondary: false
|
|
35
|
+
};
|
|
36
|
+
var _default = LayoutSection;
|
|
37
|
+
exports["default"] = _default;
|
|
38
|
+
//# sourceMappingURL=LayoutSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/Layout/components/LayoutSection/LayoutSection.js"],"names":["LayoutSection","props","className","isSecondary","children","rest","displayName","defaultProps"],"mappings":";;;;;;;;;;;;;;;AACA;;AACA;;AAaA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD,EAA+B;AAAA,MAC5CC,SAD4C,GACED,KADF,CAC5CC,SAD4C;AAAA,MACjCC,WADiC,GACEF,KADF,CACjCE,WADiC;AAAA,MACpBC,QADoB,GACEH,KADF,CACpBG,QADoB;AAAA,MACPC,IADO,6CACEJ,KADF;AAGpD,SACC;AACC,IAAA,SAAS,EAAE,4BAAG,iBAAH,EAAsBC,SAAtB,EAAiC;AAC3C,oCAA8BC;AADa,KAAjC;AADZ,KAIKE,IAJL,GAMED,QANF,CADD;AAUA,CAbD;;AAeAJ,aAAa,CAACM,WAAd,GAA4B,gBAA5B;AACAN,aAAa,CAACO,YAAd,GAA6B;AAC5BJ,EAAAA,WAAW,EAAE;AADe,CAA7B;eAIeH,a","sourcesContent":["// @flow\nimport React, { Node } from 'react'\nimport cx from 'classnames'\n\nexport type LayoutSectionProps = {\n\t/** Contents of the Layout Section */\n\tchildren: Node,\n\n\t/** Class name for the section */\n\tclassName?: string,\n\n\t/** Whether this is a secondary Layout Section */\n\tisSecondary: boolean\n}\n\nconst LayoutSection = (props: LayoutSectionProps) => {\n\tconst { className, isSecondary, children, ...rest } = props\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cx('layout__section', className, {\n\t\t\t\t'layout__section--secondary': isSecondary\n\t\t\t})}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t)\n}\n\nLayoutSection.displayName = 'Layout.Section'\nLayoutSection.defaultProps = {\n\tisSecondary: false\n}\n\nexport default LayoutSection\n"],"file":"LayoutSection.js"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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 _Layout["default"];
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, "LayoutSection", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function get() {
|
|
17
|
+
return _LayoutSection2["default"];
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
var _Layout = _interopRequireDefault(require("./Layout"));
|
|
22
|
+
|
|
23
|
+
var _LayoutSection2 = _interopRequireDefault(require("./components/LayoutSection/LayoutSection"));
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[],"file":"index.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"List-story.d.ts","sourceRoot":"","sources":["../../../src/components/List/List-story.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
+
|
|
7
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread"));
|
|
8
|
+
|
|
9
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
|
+
|
|
11
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
|
+
|
|
13
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
14
|
+
|
|
15
|
+
var _getPrototypeOf3 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
16
|
+
|
|
17
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
18
|
+
|
|
19
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
20
|
+
|
|
21
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
22
|
+
|
|
23
|
+
var _addonKnobs = require("@storybook/addon-knobs");
|
|
24
|
+
|
|
25
|
+
var _react = require("@storybook/react");
|
|
26
|
+
|
|
27
|
+
var _react2 = _interopRequireWildcard(require("react"));
|
|
28
|
+
|
|
29
|
+
var _lists = require("../../../.storybook/data/lists");
|
|
30
|
+
|
|
31
|
+
var _people = require("../../../.storybook/data/people");
|
|
32
|
+
|
|
33
|
+
var _Tabs = _interopRequireDefault(require("../Tabs/Tabs"));
|
|
34
|
+
|
|
35
|
+
var _ListHeader = _interopRequireDefault(require("./components/ListHeader/ListHeader"));
|
|
36
|
+
|
|
37
|
+
var _ListItem = _interopRequireDefault(require("./components/ListItem/ListItem"));
|
|
38
|
+
|
|
39
|
+
var _SortableList = _interopRequireDefault(require("./components/SortableList/SortableList"));
|
|
40
|
+
|
|
41
|
+
var _List = _interopRequireWildcard(require("./List"));
|
|
42
|
+
|
|
43
|
+
var _spruceTypes = require("@sprucelabs/spruce-types");
|
|
44
|
+
|
|
45
|
+
var _Button = require("../Button/Button");
|
|
46
|
+
|
|
47
|
+
var stories = (0, _react.storiesOf)('List', module);
|
|
48
|
+
|
|
49
|
+
var TabbedList =
|
|
50
|
+
/*#__PURE__*/
|
|
51
|
+
function (_Component) {
|
|
52
|
+
(0, _inherits2["default"])(TabbedList, _Component);
|
|
53
|
+
|
|
54
|
+
function TabbedList() {
|
|
55
|
+
var _getPrototypeOf2;
|
|
56
|
+
|
|
57
|
+
var _this;
|
|
58
|
+
|
|
59
|
+
(0, _classCallCheck2["default"])(this, TabbedList);
|
|
60
|
+
|
|
61
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
62
|
+
args[_key] = arguments[_key];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
_this = (0, _possibleConstructorReturn2["default"])(this, (_getPrototypeOf2 = (0, _getPrototypeOf3["default"])(TabbedList)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
66
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "state", {
|
|
67
|
+
users: _people.userList02,
|
|
68
|
+
tabs: [{
|
|
69
|
+
text: 'Guests',
|
|
70
|
+
panel: _react2["default"].createElement(_List["default"], {
|
|
71
|
+
items: _people.userList
|
|
72
|
+
})
|
|
73
|
+
}, {
|
|
74
|
+
text: 'Team',
|
|
75
|
+
panel: _react2["default"].createElement(_List["default"], {
|
|
76
|
+
items: _people.userList02
|
|
77
|
+
})
|
|
78
|
+
}, {
|
|
79
|
+
text: 'Settings',
|
|
80
|
+
panel: _react2["default"].createElement(_List["default"], {
|
|
81
|
+
items: _people.userList03
|
|
82
|
+
})
|
|
83
|
+
}],
|
|
84
|
+
activeTabIndex: 0
|
|
85
|
+
});
|
|
86
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleTabClick", function (idx) {
|
|
87
|
+
_this.setState({
|
|
88
|
+
activeTabIndex: idx
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
return _this;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
(0, _createClass2["default"])(TabbedList, [{
|
|
95
|
+
key: "render",
|
|
96
|
+
value: function render() {
|
|
97
|
+
var _this2 = this;
|
|
98
|
+
|
|
99
|
+
var _this$state = this.state,
|
|
100
|
+
tabs = _this$state.tabs,
|
|
101
|
+
activeTabIndex = _this$state.activeTabIndex;
|
|
102
|
+
return _react2["default"].createElement(_List.ListWrapper, null, _react2["default"].createElement(_react2.Fragment, null, _react2["default"].createElement(_ListHeader["default"], {
|
|
103
|
+
title: "Notes"
|
|
104
|
+
}), _react2["default"].createElement(_Tabs["default"], {
|
|
105
|
+
tabs: tabs.map(function (tab, idx) {
|
|
106
|
+
return (0, _objectSpread2["default"])({
|
|
107
|
+
isCurrent: idx === activeTabIndex,
|
|
108
|
+
onClick: function onClick() {
|
|
109
|
+
return _this2.handleTabClick(idx);
|
|
110
|
+
}
|
|
111
|
+
}, tab);
|
|
112
|
+
})
|
|
113
|
+
})));
|
|
114
|
+
}
|
|
115
|
+
}]);
|
|
116
|
+
return TabbedList;
|
|
117
|
+
}(_react2.Component); // stories.addDecorator(
|
|
118
|
+
// withKnobsOptions({
|
|
119
|
+
// escapeHTML: false
|
|
120
|
+
// })
|
|
121
|
+
// )
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
stories.addDecorator(_addonKnobs.withKnobs);
|
|
125
|
+
stories.add('List Item', function () {
|
|
126
|
+
return _react2["default"].createElement(_ListItem["default"], {
|
|
127
|
+
id: "unique",
|
|
128
|
+
title: (0, _addonKnobs.text)('title', 'Wed, Oct 28'),
|
|
129
|
+
subtitle: (0, _addonKnobs.text)('subtitle', '9am–4pm'),
|
|
130
|
+
avatar: (0, _addonKnobs.text)('avatar', ''),
|
|
131
|
+
image: (0, _addonKnobs.text)('image', ''),
|
|
132
|
+
icon: {
|
|
133
|
+
isLineIcon: (0, _addonKnobs["boolean"])('isLineIcon', true),
|
|
134
|
+
name: (0, _addonKnobs.text)('name', '')
|
|
135
|
+
},
|
|
136
|
+
isDraggable: (0, _addonKnobs["boolean"])('isDraggable', false),
|
|
137
|
+
actions: (0, _addonKnobs.object)('actions', []),
|
|
138
|
+
toggleId: (0, _addonKnobs.text)('toggleId', ''),
|
|
139
|
+
contextMenu: (0, _addonKnobs.object)('contextMenu', null),
|
|
140
|
+
isLoading: (0, _addonKnobs["boolean"])('isLoading', false)
|
|
141
|
+
});
|
|
142
|
+
}).add('Text List', function () {
|
|
143
|
+
return _react2["default"].createElement(_react2.Fragment, null, _react2["default"].createElement(_List["default"], {
|
|
144
|
+
header: (0, _addonKnobs.object)('header: text list', {
|
|
145
|
+
title: 'Holidays'
|
|
146
|
+
}),
|
|
147
|
+
isSmall: (0, _addonKnobs["boolean"])('isSmall', false),
|
|
148
|
+
items: (0, _addonKnobs.object)('items: text list', _lists.dateList),
|
|
149
|
+
isLoading: (0, _addonKnobs["boolean"])('isLoading', false)
|
|
150
|
+
}), _react2["default"].createElement(_SortableList["default"], {
|
|
151
|
+
header: (0, _addonKnobs.object)('header: sortable list', {
|
|
152
|
+
title: 'Services'
|
|
153
|
+
}),
|
|
154
|
+
isSmall: (0, _addonKnobs["boolean"])('isSmall', false),
|
|
155
|
+
onConfirm: function onConfirm() {
|
|
156
|
+
return console.log('Confirmed!');
|
|
157
|
+
},
|
|
158
|
+
items: (0, _addonKnobs.object)('items: sortable list', _lists.serviceList),
|
|
159
|
+
onSortStart: function onSortStart() {
|
|
160
|
+
return null;
|
|
161
|
+
},
|
|
162
|
+
onSortEnd: function onSortEnd() {
|
|
163
|
+
return null;
|
|
164
|
+
},
|
|
165
|
+
areSeparatorsVisible: true,
|
|
166
|
+
isLoading: (0, _addonKnobs["boolean"])('isLoading', false)
|
|
167
|
+
}), _react2["default"].createElement(_List["default"], {
|
|
168
|
+
header: (0, _addonKnobs.object)('header: dates list', {
|
|
169
|
+
title: 'Important Dates'
|
|
170
|
+
}),
|
|
171
|
+
isSmall: (0, _addonKnobs["boolean"])('isSmall', false),
|
|
172
|
+
items: (0, _addonKnobs.object)('items: dates list', _lists.dateList),
|
|
173
|
+
isLoading: (0, _addonKnobs["boolean"])('isLoading', false)
|
|
174
|
+
}));
|
|
175
|
+
}).add('Nested List', function () {
|
|
176
|
+
return _react2["default"].createElement(_List["default"], {
|
|
177
|
+
isSmall: true,
|
|
178
|
+
items: _lists.nestedList
|
|
179
|
+
});
|
|
180
|
+
}).add('List with an action', function () {
|
|
181
|
+
return _react2["default"].createElement(_List["default"], {
|
|
182
|
+
items: _lists.listWithAction
|
|
183
|
+
});
|
|
184
|
+
}).add('Icons: some hidden', function () {
|
|
185
|
+
return _react2["default"].createElement(_List["default"], {
|
|
186
|
+
header: (0, _addonKnobs.object)('header: dates list', {
|
|
187
|
+
title: 'Important Dates'
|
|
188
|
+
}),
|
|
189
|
+
isSmall: (0, _addonKnobs["boolean"])('isSmall', false),
|
|
190
|
+
items: (0, _addonKnobs.object)('items: dates list', _lists.listHiddenIcons)
|
|
191
|
+
});
|
|
192
|
+
}).add('Settings List', function () {
|
|
193
|
+
return _react2["default"].createElement(_List["default"], {
|
|
194
|
+
header: (0, _addonKnobs.object)('header', {
|
|
195
|
+
title: 'Settings'
|
|
196
|
+
}),
|
|
197
|
+
items: (0, _addonKnobs.object)('items', _lists.settingsList)
|
|
198
|
+
});
|
|
199
|
+
}).add('People List', function () {
|
|
200
|
+
return _react2["default"].createElement(_List["default"], {
|
|
201
|
+
header: {
|
|
202
|
+
title: 'Team Schedule',
|
|
203
|
+
subtitle: 'Mon, Sep 27',
|
|
204
|
+
actions: [{
|
|
205
|
+
text: 'Today',
|
|
206
|
+
kind: _Button.ButtonKinds.Simple
|
|
207
|
+
}, {
|
|
208
|
+
icon: {
|
|
209
|
+
name: 'calendar',
|
|
210
|
+
isLineIcon: true
|
|
211
|
+
},
|
|
212
|
+
kind: _Button.ButtonKinds.Simple
|
|
213
|
+
}, {
|
|
214
|
+
icon: {
|
|
215
|
+
name: 'arrow_back'
|
|
216
|
+
},
|
|
217
|
+
kind: _Button.ButtonKinds.Simple
|
|
218
|
+
}, {
|
|
219
|
+
icon: {
|
|
220
|
+
customIcon: 'arrow_forward'
|
|
221
|
+
},
|
|
222
|
+
kind: _Button.ButtonKinds.Simple
|
|
223
|
+
}]
|
|
224
|
+
},
|
|
225
|
+
isSmall: (0, _addonKnobs["boolean"])('isSmall', false),
|
|
226
|
+
items: (0, _addonKnobs.object)('items', _people.userList)
|
|
227
|
+
});
|
|
228
|
+
}).add('People Tabbed', function () {
|
|
229
|
+
return _react2["default"].createElement(TabbedList, null);
|
|
230
|
+
}).add('Selectable Items', function () {
|
|
231
|
+
return _react2["default"].createElement(_List["default"], {
|
|
232
|
+
selectableType: (0, _addonKnobs.select)('selectableType', [_spruceTypes.IHWListItemSelectableType.Checkbox, _spruceTypes.IHWListItemSelectableType.Radio], _spruceTypes.IHWListItemSelectableType.Checkbox),
|
|
233
|
+
items: (0, _addonKnobs.object)('selectable items', _lists.selectableList),
|
|
234
|
+
isSmall: (0, _addonKnobs["boolean"])('isSmall', false)
|
|
235
|
+
});
|
|
236
|
+
}).add('Expandable List Item', function () {
|
|
237
|
+
return _react2["default"].createElement(_List["default"], {
|
|
238
|
+
items: _lists.expandableList
|
|
239
|
+
});
|
|
240
|
+
});
|
|
241
|
+
//# sourceMappingURL=List-story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/List/List-story.tsx"],"names":["stories","module","TabbedList","users","userList02","tabs","text","panel","userList","userList03","activeTabIndex","idx","setState","state","map","tab","isCurrent","onClick","handleTabClick","Component","addDecorator","withKnobs","add","isLineIcon","name","title","dateList","console","log","serviceList","nestedList","listWithAction","listHiddenIcons","settingsList","subtitle","actions","kind","ButtonKinds","Simple","icon","customIcon","IHWListItemSelectableType","Checkbox","Radio","selectableList","expandableList"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;AAOA;;AACA;;AACA;;AAUA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA,IAAMA,OAAO,GAAG,sBAAU,MAAV,EAAkBC,MAAlB,CAAhB;;IASMC,U;;;;;;;;;;;;;;;;;8FACU;AACdC,MAAAA,KAAK,EAAEC,kBADO;AAEdC,MAAAA,IAAI,EAAE,CACL;AACCC,QAAAA,IAAI,EAAE,QADP;AAECC,QAAAA,KAAK,EAAE,iCAAC,gBAAD;AAAM,UAAA,KAAK,EAAEC;AAAb;AAFR,OADK,EAKL;AACCF,QAAAA,IAAI,EAAE,MADP;AAECC,QAAAA,KAAK,EAAE,iCAAC,gBAAD;AAAM,UAAA,KAAK,EAAEH;AAAb;AAFR,OALK,EASL;AACCE,QAAAA,IAAI,EAAE,UADP;AAECC,QAAAA,KAAK,EAAE,iCAAC,gBAAD;AAAM,UAAA,KAAK,EAAEE;AAAb;AAFR,OATK,CAFQ;AAgBdC,MAAAA,cAAc,EAAE;AAhBF,K;uGAmBS,UAACC,GAAD,EAAiB;AACxC,YAAKC,QAAL,CAAc;AACbF,QAAAA,cAAc,EAAEC;AADH,OAAd;AAGA,K;;;;;;6BAEmC;AA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KCa,QAAAA,IAAI,EAAEC,oBAAYC;AALnB,OALQ,EAYR;AACCC,QAAAA,IAAI,EAAE;AACLf,UAAAA,IAAI,EAAE;AADD,SADP;AAICY,QAAAA,IAAI,EAAEC,oBAAYC;AAJnB,OAZQ,EAkBR;AACCC,QAAAA,IAAI,EAAE;AACLC,UAAAA,UAAU,EAAE;AADP,SADP;AAICJ,QAAAA,IAAI,EAAEC,oBAAYC;AAJnB,OAlBQ;AAHF,KADT;AA8BC,IAAA,OAAO,EAAE,4BAAQ,SAAR,EAAmB,KAAnB,CA9BV;AA+BC,IAAA,KAAK,EAAE,wBAAO,OAAP,EAAgB9B,gBAAhB;AA/BR,IADmB;AAAA,CAzDrB,EA4FEc,GA5FF,CA4FM,eA5FN,EA4FuB;AAAA,SAAM,iCAAC,UAAD,OAAN;AAAA,CA5FvB,EA6FEA,GA7FF,CA6FM,kBA7FN,EA6F0B;AAAA,SACxB,iCAAC,gBAAD;AACC,IAAA,cAAc,EAAE,wBAGf,gBAHe,EAIf,CAACmB,uCAA0BC,QAA3B,EAAqCD,uCAA0BE,KAA/D,CAJe,EAKfF,uCAA0BC,QALX,CADjB;AAQC,IAAA,KAAK,EAAE,wBAAO,kBAAP,EAA2BE,qBAA3B,CARR;AASC,IAAA,OAAO,EAAE,4BAAQ,SAAR,EAAmB,KAAnB;AATV,IADwB;AAAA,CA7F1B,EA0GEtB,GA1GF,CA0GM,sBA1GN,EA0G8B;AAAA,SAAM,iCAAC,gBAAD;AAAM,IAAA,KAAK,EAAEuB;AAAb,IAAN;AAAA,CA1G9B","sourcesContent":["import {\n\tboolean,\n\tobject,\n\tselect,\n\ttext,\n\twithKnobs\n} from '@storybook/addon-knobs'\nimport { storiesOf } from '@storybook/react'\nimport React, { Component, Fragment } from 'react'\nimport {\n\tdateList,\n\texpandableList,\n\tlistHiddenIcons,\n\tlistWithAction,\n\tnestedList,\n\tselectableList,\n\tserviceList,\n\tsettingsList\n} from '../../../.storybook/data/lists'\nimport {\n\tuserList,\n\tuserList02,\n\tuserList03\n} from '../../../.storybook/data/people'\nimport Tabs from '../Tabs/Tabs'\nimport ListHeader from './components/ListHeader/ListHeader'\nimport ListItem from './components/ListItem/ListItem'\nimport SortableList from './components/SortableList/SortableList'\nimport List, { ListWrapper } from './List'\nimport { IHWListItemSelectableType } from '@sprucelabs/spruce-types'\nimport { ButtonKinds } from '../Button/Button'\n\nconst stories = storiesOf('List', module)\n\ninterface ITabbedProps {}\ninterface ITabbedState {\n\tusers: any[]\n\ttabs: any[]\n\tactiveTabIndex: number\n}\n\nclass TabbedList extends Component<ITabbedProps, ITabbedState> {\n\tpublic state = {\n\t\tusers: userList02,\n\t\ttabs: [\n\t\t\t{\n\t\t\t\ttext: 'Guests',\n\t\t\t\tpanel: <List items={userList} />\n\t\t\t},\n\t\t\t{\n\t\t\t\ttext: 'Team',\n\t\t\t\tpanel: <List items={userList02} />\n\t\t\t},\n\t\t\t{\n\t\t\t\ttext: 'Settings',\n\t\t\t\tpanel: <List items={userList03} />\n\t\t\t}\n\t\t],\n\t\tactiveTabIndex: 0\n\t}\n\n\tpublic handleTabClick = (idx: number) => {\n\t\tthis.setState({\n\t\t\tactiveTabIndex: idx\n\t\t})\n\t}\n\n\tpublic render(): React.ReactElement {\n\t\tconst { tabs, activeTabIndex } = this.state\n\n\t\treturn (\n\t\t\t<ListWrapper>\n\t\t\t\t<Fragment>\n\t\t\t\t\t<ListHeader title=\"Notes\" />\n\t\t\t\t\t<Tabs\n\t\t\t\t\t\ttabs={tabs.map((tab, idx) => ({\n\t\t\t\t\t\t\tisCurrent: idx === activeTabIndex,\n\t\t\t\t\t\t\tonClick: () => this.handleTabClick(idx),\n\t\t\t\t\t\t\t...tab\n\t\t\t\t\t\t}))}\n\t\t\t\t\t/>\n\t\t\t\t</Fragment>\n\t\t\t</ListWrapper>\n\t\t)\n\t}\n}\n\n// stories.addDecorator(\n// \twithKnobsOptions({\n// \t\tescapeHTML: false\n// \t})\n// )\n\nstories.addDecorator(withKnobs)\n\nstories\n\t.add('List Item', () => (\n\t\t<ListItem\n\t\t\tid=\"unique\"\n\t\t\ttitle={text('title', 'Wed, Oct 28')}\n\t\t\tsubtitle={text('subtitle', '9am–4pm')}\n\t\t\tavatar={text('avatar', '')}\n\t\t\timage={text('image', '')}\n\t\t\ticon={{ isLineIcon: boolean('isLineIcon', true), name: text('name', '') }}\n\t\t\tisDraggable={boolean('isDraggable', false)}\n\t\t\tactions={object('actions', [])}\n\t\t\ttoggleId={text('toggleId', '')}\n\t\t\tcontextMenu={object('contextMenu', null)}\n\t\t\tisLoading={boolean('isLoading', false)}\n\t\t/>\n\t))\n\t.add('Text List', () => (\n\t\t<Fragment>\n\t\t\t<List\n\t\t\t\theader={object('header: text list', { title: 'Holidays' })}\n\t\t\t\tisSmall={boolean('isSmall', false)}\n\t\t\t\titems={object('items: text list', dateList)}\n\t\t\t\tisLoading={boolean('isLoading', false)}\n\t\t\t/>\n\t\t\t<SortableList\n\t\t\t\theader={object('header: sortable list', { title: 'Services' })}\n\t\t\t\tisSmall={boolean('isSmall', false)}\n\t\t\t\tonConfirm={() => console.log('Confirmed!')}\n\t\t\t\titems={object('items: sortable list', serviceList)}\n\t\t\t\tonSortStart={() => null}\n\t\t\t\tonSortEnd={() => null}\n\t\t\t\tareSeparatorsVisible\n\t\t\t\tisLoading={boolean('isLoading', false)}\n\t\t\t/>\n\t\t\t<List\n\t\t\t\theader={object('header: dates list', { title: 'Important Dates' })}\n\t\t\t\tisSmall={boolean('isSmall', false)}\n\t\t\t\titems={object('items: dates list', dateList)}\n\t\t\t\tisLoading={boolean('isLoading', false)}\n\t\t\t/>\n\t\t</Fragment>\n\t))\n\t.add('Nested List', () => <List isSmall items={nestedList} />)\n\t.add('List with an action', () => <List items={listWithAction} />)\n\t.add('Icons: some hidden', () => (\n\t\t<List\n\t\t\theader={object('header: dates list', { title: 'Important Dates' })}\n\t\t\tisSmall={boolean('isSmall', false)}\n\t\t\titems={object('items: dates list', listHiddenIcons)}\n\t\t/>\n\t))\n\t.add('Settings List', () => (\n\t\t<List\n\t\t\theader={object('header', { title: 'Settings' })}\n\t\t\titems={object('items', settingsList)}\n\t\t/>\n\t))\n\t.add('People List', () => (\n\t\t<List\n\t\t\theader={{\n\t\t\t\ttitle: 'Team Schedule',\n\t\t\t\tsubtitle: 'Mon, Sep 27',\n\t\t\t\tactions: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: 'Today',\n\t\t\t\t\t\tkind: ButtonKinds.Simple\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: {\n\t\t\t\t\t\t\tname: 'calendar',\n\t\t\t\t\t\t\tisLineIcon: true\n\t\t\t\t\t\t},\n\t\t\t\t\t\tkind: ButtonKinds.Simple\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: {\n\t\t\t\t\t\t\tname: 'arrow_back'\n\t\t\t\t\t\t},\n\t\t\t\t\t\tkind: ButtonKinds.Simple\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: {\n\t\t\t\t\t\t\tcustomIcon: 'arrow_forward'\n\t\t\t\t\t\t},\n\t\t\t\t\t\tkind: ButtonKinds.Simple\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}}\n\t\t\tisSmall={boolean('isSmall', false)}\n\t\t\titems={object('items', userList)}\n\t\t/>\n\t))\n\t.add('People Tabbed', () => <TabbedList />)\n\t.add('Selectable Items', () => (\n\t\t<List\n\t\t\tselectableType={select<\n\t\t\t\tIHWListItemSelectableType.Checkbox | IHWListItemSelectableType.Radio\n\t\t\t>(\n\t\t\t\t'selectableType',\n\t\t\t\t[IHWListItemSelectableType.Checkbox, IHWListItemSelectableType.Radio],\n\t\t\t\tIHWListItemSelectableType.Checkbox\n\t\t\t)}\n\t\t\titems={object('selectable items', selectableList)}\n\t\t\tisSmall={boolean('isSmall', false)}\n\t\t/>\n\t))\n\t.add('Expandable List Item', () => <List items={expandableList} />)\n"],"file":"List-story.js"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { IHWAction, IHWList, IHWListHeader, IHWListItemTypes } from '@sprucelabs/spruce-types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { IExpandableListItemProps } from './components/ExpandableListItem/ExpandableListItem';
|
|
4
|
+
import { IListHeaderProps } from './components/ListHeader/ListHeader';
|
|
5
|
+
import { IListItemProps } from './components/ListItem/ListItem';
|
|
6
|
+
export declare type IWrappedItemProps = IListItemProps | IExpandableListItemProps;
|
|
7
|
+
export interface IListProps extends Omit<IHWList, 'id' | 'header' | 'items'> {
|
|
8
|
+
/** optional id for view caching */
|
|
9
|
+
id?: string;
|
|
10
|
+
/** List Header */
|
|
11
|
+
header?: IListHeaderProps | IHWListHeader | null;
|
|
12
|
+
/** List items */
|
|
13
|
+
items?: Array<IWrappedItemProps | IHWListItemTypes> | null;
|
|
14
|
+
/** Class for the list */
|
|
15
|
+
className?: string;
|
|
16
|
+
/** any passthrough to render in the body of the list */
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
/** Is this whole list in a loading state? Sets all list items to loading only if true. */
|
|
19
|
+
isLoading?: boolean;
|
|
20
|
+
/** optional, provide a handler for Actions */
|
|
21
|
+
onAction?: (action: IHWAction) => any;
|
|
22
|
+
}
|
|
23
|
+
export declare const ListWrapper: (props: any) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
|
|
24
|
+
declare const List: {
|
|
25
|
+
(props: IListProps): React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
|
|
26
|
+
defaultProps: {
|
|
27
|
+
header: null;
|
|
28
|
+
className: string;
|
|
29
|
+
isSmall: boolean;
|
|
30
|
+
areSeparatorsVisible: boolean;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export default List;
|
|
34
|
+
//# sourceMappingURL=List.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../src/components/List/List.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,SAAS,EACT,OAAO,EACP,aAAa,EACb,gBAAgB,EAChB,MAAM,0BAA0B,CAAA;AAEjC,OAAO,KAAmB,MAAM,OAAO,CAAA;AACvC,OAA2B,EAC1B,wBAAwB,EACxB,MAAM,oDAAoD,CAAA;AAC3D,OAAmB,EAClB,gBAAgB,EAChB,MAAM,oCAAoC,CAAA;AAC3C,OAAiB,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAEzE,oBAAY,iBAAiB,GAAG,cAAc,GAAG,wBAAwB,CAAA;AAEzE,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,OAAO,EAAE,IAAI,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC3E,mCAAmC;IACnC,EAAE,CAAC,EAAE,MAAM,CAAA;IAEX,kBAAkB;IAClB,MAAM,CAAC,EAAE,gBAAgB,GAAG,aAAa,GAAG,IAAI,CAAA;IAEhD,iBAAiB;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC,iBAAiB,GAAG,gBAAgB,CAAC,GAAG,IAAI,CAAA;IAE1D,yBAAyB;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,wDAAwD;IACxD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAE1B,0FAA0F;IAC1F,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,GAAG,CAAA;CACrC;AAED,eAAO,MAAM,WAAW,gOAEvB,CAAA;AAED,QAAA,MAAM,IAAI;;;;;;;;CAiET,CAAA;AASD,eAAe,IAAI,CAAA"}
|