design-react-kit 3.3.1 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.EN.md +35 -17
- package/README.md +34 -18
- package/package.json +152 -120
- package/src/Accordion/Accordion.tsx +30 -0
- package/src/Accordion/AccordionBody.tsx +127 -0
- package/src/Accordion/AccordionHeader.tsx +42 -0
- package/src/Alert/Alert.tsx +39 -0
- package/src/Avatar/AvatarContainer.tsx +22 -0
- package/src/Avatar/AvatarExtraText.tsx +19 -0
- package/src/Avatar/AvatarGroupContainer.tsx +23 -0
- package/src/Avatar/AvatarIcon.tsx +57 -0
- package/src/Avatar/AvatarPresence.tsx +24 -0
- package/src/Avatar/AvatarStatus.tsx +24 -0
- package/src/Avatar/AvatarWrapper.tsx +24 -0
- package/src/Badge/Badge.tsx +40 -0
- package/src/BottomNav/BottomNav.tsx +20 -0
- package/src/BottomNav/BottomNavItem.tsx +75 -0
- package/src/Breadcrumb/Breadcrumb.tsx +40 -0
- package/src/Button/Button.tsx +55 -0
- package/src/Callout/Callout.tsx +35 -0
- package/src/Callout/CalloutText.tsx +29 -0
- package/src/Callout/CalloutTitle.tsx +24 -0
- package/src/Card/Card.tsx +49 -0
- package/src/Card/CardBody.tsx +21 -0
- package/src/Card/CardCategory.tsx +48 -0
- package/src/Card/CardFooterCTA.tsx +19 -0
- package/src/Card/CardReadMore.tsx +35 -0
- package/src/Card/CardSignature.tsx +19 -0
- package/src/Card/CardTag.tsx +19 -0
- package/src/Card/CardTagsHeader.tsx +28 -0
- package/src/Card/CardText.tsx +19 -0
- package/src/Card/CardTitle.tsx +17 -0
- package/src/Chips/Chip.tsx +37 -0
- package/src/Chips/ChipLabel.tsx +19 -0
- package/src/Collapse/Collapse.tsx +100 -0
- package/src/CookieBar/CookieBar.tsx +19 -0
- package/src/CookieBar/CookieBarButton.tsx +27 -0
- package/src/CookieBar/CookieBarButtons.tsx +19 -0
- package/src/Dimmer/Dimmer.tsx +51 -0
- package/src/Dimmer/DimmerButtons.tsx +35 -0
- package/src/FontLoader/FontLoader.tsx +32 -0
- package/src/Forward/Forward.tsx +40 -0
- package/src/Grid/GridItem.tsx +23 -0
- package/src/Grid/GridItemText.tsx +20 -0
- package/src/Grid/GridItemTextWrapper.tsx +21 -0
- package/src/Grid/GridList.tsx +20 -0
- package/src/Grid/GridRow.tsx +20 -0
- package/src/Grid/index.ts +11 -0
- package/src/{components/Header/Header.js → Header/Header.tsx} +19 -24
- package/src/Header/HeaderBrand.tsx +90 -0
- package/src/Header/HeaderContent.tsx +42 -0
- package/src/Header/HeaderContext.tsx +9 -0
- package/src/Header/HeaderLinkZone.tsx +19 -0
- package/src/Header/HeaderRightZone.tsx +26 -0
- package/src/Header/HeaderSearch.tsx +33 -0
- package/src/Header/HeaderSocialsZone.tsx +26 -0
- package/src/Header/HeaderToggler.tsx +46 -0
- package/src/{components/Header/Headers.js → Header/Headers.tsx} +17 -22
- package/src/Hero/Hero.tsx +34 -0
- package/src/Hero/HeroBackground.tsx +25 -0
- package/src/Hero/HeroBody.tsx +21 -0
- package/src/Hero/HeroButton.tsx +19 -0
- package/src/Hero/HeroCategory.tsx +15 -0
- package/src/Hero/HeroTitle.tsx +16 -0
- package/src/Hero/index.ts +13 -0
- package/src/Icon/EmptyIcon.tsx +7 -0
- package/src/Icon/Icon.tsx +116 -0
- package/src/Icon/assets/ItArrowDown.tsx +9 -0
- package/src/Icon/assets/ItArrowDownCircle.tsx +9 -0
- package/src/Icon/assets/ItArrowDownTriangle.tsx +9 -0
- package/src/Icon/assets/ItArrowLeft.tsx +9 -0
- package/src/Icon/assets/ItArrowLeftCircle.tsx +9 -0
- package/src/Icon/assets/ItArrowLeftTriangle.tsx +9 -0
- package/src/Icon/assets/ItArrowRight.tsx +9 -0
- package/src/Icon/assets/ItArrowRightCircle.tsx +9 -0
- package/src/Icon/assets/ItArrowRightTriangle.tsx +9 -0
- package/src/Icon/assets/ItArrowUp.tsx +9 -0
- package/src/Icon/assets/ItArrowUpCircle.tsx +9 -0
- package/src/Icon/assets/ItArrowUpTriangle.tsx +9 -0
- package/src/Icon/assets/ItBan.tsx +9 -0
- package/src/Icon/assets/ItBehance.tsx +9 -0
- package/src/Icon/assets/ItBookmark.tsx +9 -0
- package/src/Icon/assets/ItBox.tsx +12 -0
- package/src/Icon/assets/ItBurger.tsx +9 -0
- package/src/Icon/assets/ItCalendar.tsx +9 -0
- package/src/Icon/assets/ItCamera.tsx +9 -0
- package/src/Icon/assets/ItCard.tsx +9 -0
- package/src/Icon/assets/ItChartLine.tsx +12 -0
- package/src/Icon/assets/ItCheck.tsx +9 -0
- package/src/Icon/assets/ItCheckCircle.tsx +9 -0
- package/src/Icon/assets/ItChevronLeft.tsx +8 -0
- package/src/Icon/assets/ItChevronRight.tsx +8 -0
- package/src/Icon/assets/ItClip.tsx +9 -0
- package/src/Icon/assets/ItClock.tsx +9 -0
- package/src/Icon/assets/ItClose.tsx +9 -0
- package/src/Icon/assets/ItCloseBig.tsx +9 -0
- package/src/Icon/assets/ItCloseCircle.tsx +9 -0
- package/src/Icon/assets/ItCodeCircle.tsx +9 -0
- package/src/Icon/assets/ItCollapse.tsx +8 -0
- package/src/Icon/assets/ItComment.tsx +9 -0
- package/src/Icon/assets/ItCopy.tsx +9 -0
- package/src/Icon/assets/ItDelete.tsx +12 -0
- package/src/Icon/assets/ItDesignersItalia.tsx +9 -0
- package/src/Icon/assets/ItDownload.tsx +9 -0
- package/src/Icon/assets/ItError.tsx +9 -0
- package/src/Icon/assets/ItExchangeCircle.tsx +9 -0
- package/src/Icon/assets/ItExpand.tsx +8 -0
- package/src/Icon/assets/ItExternalLink.tsx +9 -0
- package/src/Icon/assets/ItFacebook.tsx +9 -0
- package/src/Icon/assets/ItFacebookSquare.tsx +9 -0
- package/src/Icon/assets/ItFile.tsx +9 -0
- package/src/Icon/assets/ItFiles.tsx +9 -0
- package/src/Icon/assets/ItFlag.tsx +9 -0
- package/src/Icon/assets/ItFlickr.tsx +10 -0
- package/src/Icon/assets/ItFlickrSquare.tsx +9 -0
- package/src/Icon/assets/ItFolder.tsx +9 -0
- package/src/Icon/assets/ItFullscreen.tsx +11 -0
- package/src/Icon/assets/ItFunnel.tsx +9 -0
- package/src/Icon/assets/ItGithub.tsx +9 -0
- package/src/Icon/assets/ItHearing.tsx +9 -0
- package/src/Icon/assets/ItHelp.tsx +9 -0
- package/src/Icon/assets/ItHelpCircle.tsx +9 -0
- package/src/Icon/assets/ItHorn.tsx +9 -0
- package/src/Icon/assets/ItInbox.tsx +12 -0
- package/src/Icon/assets/ItInfoCircle.tsx +9 -0
- package/src/Icon/assets/ItInstagram.tsx +9 -0
- package/src/Icon/assets/ItKey.tsx +9 -0
- package/src/Icon/assets/ItLessCircle.tsx +12 -0
- package/src/Icon/assets/ItLink.tsx +9 -0
- package/src/Icon/assets/ItLinkedin.tsx +9 -0
- package/src/Icon/assets/ItLinkedinSquare.tsx +9 -0
- package/src/Icon/assets/ItList.tsx +9 -0
- package/src/Icon/assets/ItLock.tsx +12 -0
- package/src/Icon/assets/ItLocked.tsx +9 -0
- package/src/Icon/assets/ItMail.tsx +9 -0
- package/src/Icon/assets/ItMapMarker.tsx +9 -0
- package/src/Icon/assets/ItMapMarkerCircle.tsx +12 -0
- package/src/Icon/assets/ItMapMarkerMinus.tsx +9 -0
- package/src/Icon/assets/ItMapMarkerPlus.tsx +12 -0
- package/src/Icon/assets/ItMaximize.tsx +11 -0
- package/src/Icon/assets/ItMaximizeAlt.tsx +11 -0
- package/src/Icon/assets/ItMedium.tsx +9 -0
- package/src/Icon/assets/ItMediumSquare.tsx +9 -0
- package/src/Icon/assets/ItMinimize.tsx +11 -0
- package/src/Icon/assets/ItMinus.tsx +9 -0
- package/src/Icon/assets/ItMinusCircle.tsx +9 -0
- package/src/Icon/assets/ItMoreActions.tsx +9 -0
- package/src/Icon/assets/ItMoreItems.tsx +9 -0
- package/src/Icon/assets/ItNote.tsx +9 -0
- package/src/Icon/assets/ItOpenSource.tsx +9 -0
- package/src/Icon/assets/ItPa.tsx +9 -0
- package/src/Icon/assets/ItPasswordInvisible.tsx +9 -0
- package/src/Icon/assets/ItPasswordVisible.tsx +9 -0
- package/src/Icon/assets/ItPencil.tsx +9 -0
- package/src/Icon/assets/ItPiattaforme.tsx +10 -0
- package/src/Icon/assets/ItPin.tsx +9 -0
- package/src/Icon/assets/ItPlug.tsx +9 -0
- package/src/Icon/assets/ItPlus.tsx +9 -0
- package/src/Icon/assets/ItPlusCircle.tsx +9 -0
- package/src/Icon/assets/ItPresentation.tsx +9 -0
- package/src/Icon/assets/ItPrint.tsx +9 -0
- package/src/Icon/assets/ItRefresh.tsx +9 -0
- package/src/Icon/assets/ItRestore.tsx +9 -0
- package/src/Icon/assets/ItRss.tsx +11 -0
- package/src/Icon/assets/ItRssSquare.tsx +9 -0
- package/src/Icon/assets/ItSearch.tsx +9 -0
- package/src/Icon/assets/ItSettings.tsx +9 -0
- package/src/Icon/assets/ItShare.tsx +9 -0
- package/src/Icon/assets/ItSoftware.tsx +10 -0
- package/src/Icon/assets/ItStarFull.tsx +9 -0
- package/src/Icon/assets/ItStarOutline.tsx +9 -0
- package/src/Icon/assets/ItTeamDigitale.tsx +8 -0
- package/src/Icon/assets/ItTelegram.tsx +11 -0
- package/src/Icon/assets/ItTelephone.tsx +9 -0
- package/src/Icon/assets/ItTool.tsx +9 -0
- package/src/Icon/assets/ItTwitter.tsx +9 -0
- package/src/Icon/assets/ItTwitterSquare.tsx +9 -0
- package/src/Icon/assets/ItUnlocked.tsx +9 -0
- package/src/Icon/assets/ItUpload.tsx +9 -0
- package/src/Icon/assets/ItUser.tsx +9 -0
- package/src/Icon/assets/ItVideo.tsx +9 -0
- package/src/Icon/assets/ItWarning.tsx +9 -0
- package/src/Icon/assets/ItWarningCircle.tsx +9 -0
- package/src/Icon/assets/ItWhatsapp.tsx +9 -0
- package/src/Icon/assets/ItWhatsappSquare.tsx +10 -0
- package/src/Icon/assets/ItWifi.tsx +12 -0
- package/src/Icon/assets/ItYoutube.tsx +9 -0
- package/src/Icon/assets/ItZoomIn.tsx +9 -0
- package/src/Icon/assets/ItZoomOut.tsx +9 -0
- package/src/Icon/assets/index.tsx +504 -0
- package/src/Input/Input.tsx +342 -0
- package/src/Input/InputContainer.tsx +34 -0
- package/src/Input/TextArea.tsx +184 -0
- package/src/Input/TimeInput.tsx +303 -0
- package/src/Input/utils.tsx +166 -0
- package/src/LinkList/LinkList.tsx +65 -0
- package/src/LinkList/LinkListItem.tsx +98 -0
- package/src/Megamenu/Megamenu.tsx +37 -0
- package/src/Megamenu/MegamenuFooter.tsx +20 -0
- package/src/Megamenu/MegamenuHighlightColumn.tsx +33 -0
- package/src/Megamenu/MegamenuItem.tsx +27 -0
- package/src/Modal/Modal.tsx +79 -0
- package/src/Modal/ModalBody.tsx +11 -0
- package/src/Modal/ModalFooter.tsx +11 -0
- package/src/Modal/ModalHeader.tsx +70 -0
- package/src/Nav/Nav.tsx +56 -0
- package/src/Notification/Notification.tsx +60 -0
- package/src/Notification/NotificationContent.tsx +135 -0
- package/src/Notification/NotificationManager.tsx +65 -0
- package/src/Notification/core.tsx +46 -0
- package/src/Notification/index.ts +9 -0
- package/src/Notification/types.ts +12 -0
- package/src/Notification/usePosition.tsx +11 -0
- package/src/Pager/Pager.tsx +48 -0
- package/src/PasswordInput/PasswordInput.tsx +43 -0
- package/src/Progress/Progress.tsx +94 -0
- package/src/Rating/Rating.tsx +130 -0
- package/src/ResponsiveImage/ResponsiveImage.tsx +25 -0
- package/src/Section/Section.tsx +86 -0
- package/src/Select/Select.tsx +97 -0
- package/src/Select/shared.tsx +45 -0
- package/src/Sidebar/Sidebar.tsx +46 -0
- package/src/Skiplink/Skiplink.tsx +20 -0
- package/src/Skiplink/SkiplinkItem.tsx +29 -0
- package/src/Spinner/Spinner.tsx +55 -0
- package/src/Stepper/StepperContainer.tsx +30 -0
- package/src/Stepper/StepperContent.tsx +51 -0
- package/src/Stepper/StepperDots.tsx +21 -0
- package/src/Stepper/StepperHeader.tsx +19 -0
- package/src/Stepper/StepperHeaderElement.tsx +77 -0
- package/src/Stepper/StepperNav.tsx +19 -0
- package/src/ThumbNav/ThumbNav.tsx +37 -0
- package/src/ThumbNav/ThumbNavItem.tsx +35 -0
- package/src/Timeline/TimelinePin.tsx +67 -0
- package/src/Timeline/TimelineWrapper.tsx +19 -0
- package/src/Toggle/Toggle.tsx +29 -0
- package/src/Toolbar/Toolbar.tsx +28 -0
- package/src/Toolbar/ToolbarDividerItem.tsx +5 -0
- package/src/Toolbar/ToolbarItem.tsx +95 -0
- package/src/assets.d.ts +4 -0
- package/src/index.tsx +350 -0
- package/src/utils.tsx +26 -0
- package/.editorconfig +0 -18
- package/.eslintrc +0 -65
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -32
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -24
- package/AUTHORS +0 -3
- package/CODE_OF_CONDUCT.EN.md +0 -77
- package/CODE_OF_CONDUCT.md +0 -69
- package/dist/design-react-kit.cjs.js +0 -3698
- package/dist/design-react-kit.cjs.js.map +0 -1
- package/dist/design-react-kit.d.ts +0 -1704
- package/dist/design-react-kit.es.js +0 -3188
- package/dist/design-react-kit.es.js.map +0 -1
- package/dist/design-react-kit.full.js +0 -17596
- package/dist/design-react-kit.full.js.map +0 -1
- package/dist/design-react-kit.full.min.js +0 -2
- package/dist/design-react-kit.full.min.js.map +0 -1
- package/dist/design-react-kit.js +0 -13394
- package/dist/design-react-kit.js.map +0 -1
- package/dist/design-react-kit.min.js +0 -2
- package/dist/design-react-kit.min.js.map +0 -1
- package/src/Storyshots.test.js +0 -9
- package/src/components/Accordion/Accordion.js +0 -22
- package/src/components/Accordion/AccordionBody.js +0 -118
- package/src/components/Accordion/AccordionHeader.js +0 -37
- package/src/components/Autocomplete/Autocomplete.js +0 -255
- package/src/components/Avatar/AvatarContainer.js +0 -24
- package/src/components/Avatar/AvatarExtraText.js +0 -22
- package/src/components/Avatar/AvatarGroupContainer.js +0 -23
- package/src/components/Avatar/AvatarIcon.js +0 -32
- package/src/components/Avatar/AvatarPresence.js +0 -25
- package/src/components/Avatar/AvatarStatus.js +0 -25
- package/src/components/Avatar/AvatarWrapper.js +0 -25
- package/src/components/Badge/Badge.js +0 -28
- package/src/components/BottomNav/BottomNav.js +0 -27
- package/src/components/BottomNav/BottomNavItem.js +0 -69
- package/src/components/Button/Button.js +0 -26
- package/src/components/Callout/Callout.js +0 -33
- package/src/components/Callout/CalloutText.js +0 -37
- package/src/components/Callout/CalloutTitle.js +0 -27
- package/src/components/Card/Card.js +0 -50
- package/src/components/Card/CardCategory.js +0 -43
- package/src/components/Card/CardFooterCTA.js +0 -17
- package/src/components/Card/CardReadMore.js +0 -45
- package/src/components/Card/CardSignature.js +0 -17
- package/src/components/Card/CardTag.js +0 -23
- package/src/components/Card/CardTagsHeader.js +0 -21
- package/src/components/Chips/Chip.js +0 -50
- package/src/components/Chips/ChipLabel.js +0 -25
- package/src/components/Collapse/Collapse.js +0 -66
- package/src/components/CookieBar/CookieBar.js +0 -22
- package/src/components/CookieBar/CookieBarButton.js +0 -25
- package/src/components/CookieBar/CookieBarButtons.js +0 -23
- package/src/components/Dimmer/Dimmer.js +0 -38
- package/src/components/Dimmer/DimmerButtons.js +0 -35
- package/src/components/FontLoader/FontLoader.js +0 -22
- package/src/components/FormGroup/FormGroup.js +0 -137
- package/src/components/Forward/Forward.js +0 -32
- package/src/components/Header/HeaderBrand.js +0 -86
- package/src/components/Header/HeaderContent.js +0 -49
- package/src/components/Header/HeaderContext.js +0 -14
- package/src/components/Header/HeaderLinkZone.js +0 -24
- package/src/components/Header/HeaderRightZone.js +0 -33
- package/src/components/Header/HeaderSearch.js +0 -36
- package/src/components/Header/HeaderSocialsZone.js +0 -30
- package/src/components/Header/HeaderToggler.js +0 -50
- package/src/components/Hero/Hero.js +0 -10
- package/src/components/Icon/Icon.js +0 -42
- package/src/components/Input/Input.js +0 -261
- package/src/components/Input/InputContainer.js +0 -39
- package/src/components/Input/utils.js +0 -126
- package/src/components/LinkList/LinkList.js +0 -65
- package/src/components/LinkList/LinkListItem.js +0 -88
- package/src/components/Nav/Nav.js +0 -37
- package/src/components/Notification/Notification.js +0 -78
- package/src/components/Offcanvas/Offcanvas.js +0 -101
- package/src/components/Pager/Pager.js +0 -32
- package/src/components/PagerList/PagerList.js +0 -28
- package/src/components/PasswordInput/PasswordInput.js +0 -41
- package/src/components/PasswordMeter/PasswordMeter.js +0 -80
- package/src/components/Progress/Progress.js +0 -88
- package/src/components/Rating/Rating.js +0 -130
- package/src/components/Section/Section.js +0 -49
- package/src/components/Separator/Separator.js +0 -34
- package/src/components/Sidebar/Sidebar.js +0 -53
- package/src/components/Skiplink/Skiplink.js +0 -25
- package/src/components/Skiplink/SkiplinkItem.js +0 -25
- package/src/components/Spinner/Spinner.js +0 -65
- package/src/components/Stepper/StepperContainer.js +0 -33
- package/src/components/Stepper/StepperContent.js +0 -54
- package/src/components/Stepper/StepperDots.js +0 -27
- package/src/components/Stepper/StepperHeader.js +0 -27
- package/src/components/Stepper/StepperHeaderElement.js +0 -45
- package/src/components/Stepper/StepperNav.js +0 -27
- package/src/components/Table/Table.js +0 -68
- package/src/components/Timeline/TimelinePin.js +0 -59
- package/src/components/Timeline/TimelineWrapper.js +0 -21
- package/src/components/Toggle/Toggle.js +0 -27
- package/src/components/utils.js +0 -1
- package/src/index.js +0 -144
- package/static/favicons/android-chrome-192x192.png +0 -0
- package/static/favicons/android-chrome-512x512.png +0 -0
- package/static/favicons/apple-touch-icon.png +0 -0
- package/static/favicons/browserconfig.xml +0 -9
- package/static/favicons/favicon-16x16.png +0 -0
- package/static/favicons/favicon-32x32.png +0 -0
- package/static/favicons/favicon.ico +0 -0
- package/static/favicons/manifest.webmanifest +0 -21
- package/static/favicons/mstile-150x150.png +0 -0
- package/static/favicons/safari-pinned-tab.svg +0 -23
package/src/Storyshots.test.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// File is located here in order to avoid a custom jest.config.js
|
|
2
|
-
// Current config is inherited from react-scripts
|
|
3
|
-
import initStoryshots, {
|
|
4
|
-
multiSnapshotWithOptions
|
|
5
|
-
} from '@storybook/addon-storyshots'
|
|
6
|
-
|
|
7
|
-
initStoryshots({
|
|
8
|
-
test: multiSnapshotWithOptions({})
|
|
9
|
-
})
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import classNames from 'classnames'
|
|
4
|
-
|
|
5
|
-
const propTypes = {
|
|
6
|
-
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
7
|
-
className: PropTypes.string
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const defaultProps = {
|
|
11
|
-
tag: 'div'
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export default function Accordion(props) {
|
|
15
|
-
const { className, tag: Tag, ...attributes } = props
|
|
16
|
-
const classes = classNames('collapse-div', className)
|
|
17
|
-
|
|
18
|
-
return <Tag {...attributes} className={classes} />
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
Accordion.propTypes = propTypes
|
|
22
|
-
Accordion.defaultProps = defaultProps
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import React, { Component } from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import classNames from 'classnames'
|
|
4
|
-
import Transition from 'react-transition-group/Transition'
|
|
5
|
-
|
|
6
|
-
import { Util } from 'reactstrap'
|
|
7
|
-
|
|
8
|
-
const {
|
|
9
|
-
TransitionTimeouts,
|
|
10
|
-
TransitionPropTypeKeys,
|
|
11
|
-
TransitionStatuses,
|
|
12
|
-
pick,
|
|
13
|
-
omit
|
|
14
|
-
} = Util
|
|
15
|
-
|
|
16
|
-
const propTypes = {
|
|
17
|
-
...Transition.propTypes, // eslint-disable-line react/forbid-foreign-prop-types
|
|
18
|
-
children: PropTypes.oneOfType([
|
|
19
|
-
PropTypes.arrayOf(PropTypes.node),
|
|
20
|
-
PropTypes.node
|
|
21
|
-
]),
|
|
22
|
-
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
23
|
-
className: PropTypes.string,
|
|
24
|
-
active: PropTypes.bool,
|
|
25
|
-
onToggle: PropTypes.func
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const defaultProps = {
|
|
29
|
-
...Transition.defaultProps,
|
|
30
|
-
timeout: TransitionTimeouts.Collapse,
|
|
31
|
-
tag: 'div'
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const transitionStatusToClassHash = {
|
|
35
|
-
[TransitionStatuses.ENTERING]: 'collapsing',
|
|
36
|
-
[TransitionStatuses.ENTERED]: 'collapse show',
|
|
37
|
-
[TransitionStatuses.EXITING]: 'collapsing',
|
|
38
|
-
[TransitionStatuses.EXITED]: 'collapse'
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function getTransitionClass(status) {
|
|
42
|
-
return transitionStatusToClassHash[status] || 'collapse'
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function getHeight(node) {
|
|
46
|
-
return node.scrollHeight
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export default class AccordionBody extends Component {
|
|
50
|
-
state = {
|
|
51
|
-
height: null
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
onEntering = (node, isAppearing) => {
|
|
55
|
-
this.setState({ height: getHeight(node) })
|
|
56
|
-
this.props.onEntering(node, isAppearing)
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
onEntered = (node, isAppearing) => {
|
|
60
|
-
this.setState({ height: null })
|
|
61
|
-
this.props.onEntered(node, isAppearing)
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
onExit = node => {
|
|
65
|
-
this.setState({ height: getHeight(node) })
|
|
66
|
-
this.props.onExit(node)
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
onExiting = node => {
|
|
70
|
-
// getting this variable triggers a reflow
|
|
71
|
-
const _unused = node.offsetHeight // eslint-disable-line no-unused-vars
|
|
72
|
-
this.setState({ height: 0 })
|
|
73
|
-
this.props.onExiting(node)
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
onExited = node => {
|
|
77
|
-
this.setState({ height: null })
|
|
78
|
-
this.props.onExited(node)
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
render() {
|
|
82
|
-
const { className, tag: Tag, active, children, ...attributes } = this.props
|
|
83
|
-
const { height } = this.state
|
|
84
|
-
|
|
85
|
-
const transitionProps = pick(attributes, TransitionPropTypeKeys)
|
|
86
|
-
const childProps = omit(attributes, TransitionPropTypeKeys)
|
|
87
|
-
|
|
88
|
-
return (
|
|
89
|
-
<Transition
|
|
90
|
-
{...transitionProps}
|
|
91
|
-
in={active}
|
|
92
|
-
onEntering={this.onEntering}
|
|
93
|
-
onEntered={this.onEntered}
|
|
94
|
-
onExit={this.onExit}
|
|
95
|
-
onExiting={this.onExiting}
|
|
96
|
-
onExited={this.onExited}>
|
|
97
|
-
{status => {
|
|
98
|
-
const transitionClass = getTransitionClass(status)
|
|
99
|
-
const classes = classNames(className, transitionClass)
|
|
100
|
-
|
|
101
|
-
const style = height === null ? null : { height }
|
|
102
|
-
|
|
103
|
-
return (
|
|
104
|
-
<Tag
|
|
105
|
-
className={classes}
|
|
106
|
-
style={{ ...childProps.style, ...style }}
|
|
107
|
-
{...childProps}>
|
|
108
|
-
<div className="collapse-body">{children}</div>
|
|
109
|
-
</Tag>
|
|
110
|
-
)
|
|
111
|
-
}}
|
|
112
|
-
</Transition>
|
|
113
|
-
)
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
AccordionBody.propTypes = propTypes
|
|
118
|
-
AccordionBody.defaultProps = defaultProps
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import classNames from 'classnames'
|
|
4
|
-
|
|
5
|
-
const propTypes = {
|
|
6
|
-
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
7
|
-
className: PropTypes.string,
|
|
8
|
-
active: PropTypes.bool,
|
|
9
|
-
onToggle: PropTypes.func
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const defaultProps = {
|
|
13
|
-
tag: 'button'
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export default function AccordionHeader(props) {
|
|
17
|
-
const { className, tag: Tag, active, onToggle, ...attributes } = props
|
|
18
|
-
const classes = classNames('collapse-header')
|
|
19
|
-
const toggleClasses = classNames(className, {
|
|
20
|
-
collapsed: active
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<div className={classes}>
|
|
25
|
-
<Tag
|
|
26
|
-
data-toggle="collapse"
|
|
27
|
-
aria-expanded={active ? 'true' : 'false'}
|
|
28
|
-
className={toggleClasses}
|
|
29
|
-
onClick={onToggle}
|
|
30
|
-
{...attributes}
|
|
31
|
-
/>
|
|
32
|
-
</div>
|
|
33
|
-
)
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
AccordionHeader.propTypes = propTypes
|
|
37
|
-
AccordionHeader.defaultProps = defaultProps
|
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
// /* eslint no-unused-vars: ["error", { "ignoreRestSiblings": true }] */
|
|
2
|
-
// // Customized components for https://github.com/JedWatson/react-select/tree/v2/src
|
|
3
|
-
|
|
4
|
-
// import React, { Component, Fragment } from 'react';
|
|
5
|
-
// import PropTypes from 'prop-types';
|
|
6
|
-
// import ReactSelect, { SelectBase, components as defaultComponents } from 'react-select';
|
|
7
|
-
|
|
8
|
-
// import { SelectPropTypes } from '../Select/Select';
|
|
9
|
-
|
|
10
|
-
// const SelectContainer = (props) => {
|
|
11
|
-
// const { children, innerProps, selectProps } = props;
|
|
12
|
-
// const { bsSize } = selectProps;
|
|
13
|
-
|
|
14
|
-
// const classNames = [
|
|
15
|
-
// 'autocomplete-container autocomplete-wrapper custom-autocomplete',
|
|
16
|
-
// bsSize ? `form-control-${bsSize}` : '',
|
|
17
|
-
// ].join(' ');
|
|
18
|
-
|
|
19
|
-
// return (
|
|
20
|
-
// <div className={classNames} {...innerProps}>
|
|
21
|
-
// {children}
|
|
22
|
-
// </div>
|
|
23
|
-
// );
|
|
24
|
-
// };
|
|
25
|
-
|
|
26
|
-
// SelectContainer.propTypes = {
|
|
27
|
-
// selectProps: PropTypes.shape(SelectPropTypes),
|
|
28
|
-
// children: PropTypes.node,
|
|
29
|
-
// innerProps: PropTypes.any,
|
|
30
|
-
// };
|
|
31
|
-
|
|
32
|
-
// const Control = (props) => {
|
|
33
|
-
// const { children, innerProps } = props;
|
|
34
|
-
// const { innerRef, ...rest } = innerProps;
|
|
35
|
-
|
|
36
|
-
// return (
|
|
37
|
-
// <div className="autocomplete-control" {...rest}>
|
|
38
|
-
// {children}
|
|
39
|
-
// </div>
|
|
40
|
-
// );
|
|
41
|
-
// };
|
|
42
|
-
|
|
43
|
-
// Control.propTypes = {
|
|
44
|
-
// selectProps: PropTypes.shape(SelectPropTypes),
|
|
45
|
-
// children: PropTypes.node,
|
|
46
|
-
// innerProps: PropTypes.any,
|
|
47
|
-
// };
|
|
48
|
-
|
|
49
|
-
// class ValueContainer extends Component {
|
|
50
|
-
// render() {
|
|
51
|
-
// const { children, selectProps } = this.props;
|
|
52
|
-
// const { components } = selectProps;
|
|
53
|
-
|
|
54
|
-
// return (
|
|
55
|
-
// <div className="autocomplete-value-container">
|
|
56
|
-
// {(() => React.Children.map(children, (child) => {
|
|
57
|
-
// if (child === null) return;
|
|
58
|
-
|
|
59
|
-
// const { isDisabled, cx, ...rest } = child.props;
|
|
60
|
-
// switch (child.type) {
|
|
61
|
-
// case defaultComponents.Input:
|
|
62
|
-
// case components.Input:
|
|
63
|
-
// return <Input
|
|
64
|
-
// {...rest}
|
|
65
|
-
// selectProps={selectProps}
|
|
66
|
-
// />;
|
|
67
|
-
// default:
|
|
68
|
-
// return child;
|
|
69
|
-
// }
|
|
70
|
-
// }))()}
|
|
71
|
-
// </div>
|
|
72
|
-
// );
|
|
73
|
-
// }
|
|
74
|
-
// }
|
|
75
|
-
|
|
76
|
-
// ValueContainer.propTypes = {
|
|
77
|
-
// selectProps: PropTypes.shape(SelectPropTypes),
|
|
78
|
-
// children: PropTypes.node,
|
|
79
|
-
// };
|
|
80
|
-
|
|
81
|
-
// class MenuList extends Component {
|
|
82
|
-
// styles = {
|
|
83
|
-
// top: -16,
|
|
84
|
-
// };
|
|
85
|
-
|
|
86
|
-
// render() {
|
|
87
|
-
// const { children } = this.props;
|
|
88
|
-
|
|
89
|
-
// return (
|
|
90
|
-
// <ul className="autocomplete-wrap" style={this.styles}>
|
|
91
|
-
// {children}
|
|
92
|
-
// </ul>
|
|
93
|
-
// );
|
|
94
|
-
// }
|
|
95
|
-
// }
|
|
96
|
-
|
|
97
|
-
// MenuList.propTypes = {
|
|
98
|
-
// children: PropTypes.node,
|
|
99
|
-
// innerProps: PropTypes.any,
|
|
100
|
-
// };
|
|
101
|
-
|
|
102
|
-
// const Option = (props) => {
|
|
103
|
-
// const { children, innerProps } = props;
|
|
104
|
-
// const { innerRef, ...rest } = innerProps;
|
|
105
|
-
|
|
106
|
-
// return <li {...rest}>{children}</li>;
|
|
107
|
-
// };
|
|
108
|
-
|
|
109
|
-
// Option.propTypes = {
|
|
110
|
-
// children: PropTypes.node,
|
|
111
|
-
// innerProps: PropTypes.any,
|
|
112
|
-
// };
|
|
113
|
-
|
|
114
|
-
// class Input extends Component {
|
|
115
|
-
// render() {
|
|
116
|
-
// const {
|
|
117
|
-
// getStyles,
|
|
118
|
-
// innerRef,
|
|
119
|
-
// isHidden,
|
|
120
|
-
// selectProps,
|
|
121
|
-
// ...rest
|
|
122
|
-
// } = this.props;
|
|
123
|
-
// const classNames = 'autocomplete-input-container search-wrap';
|
|
124
|
-
|
|
125
|
-
// return (
|
|
126
|
-
// <div className={classNames}>
|
|
127
|
-
// <input
|
|
128
|
-
// {...rest}
|
|
129
|
-
// type="search"
|
|
130
|
-
// className="form-control autocomplete"
|
|
131
|
-
// />
|
|
132
|
-
// </div>
|
|
133
|
-
// );
|
|
134
|
-
// }
|
|
135
|
-
// }
|
|
136
|
-
|
|
137
|
-
// Input.propTypes = {
|
|
138
|
-
// selectProps: PropTypes.shape(SelectPropTypes),
|
|
139
|
-
// getStyles: PropTypes.func,
|
|
140
|
-
// isHidden: PropTypes.bool,
|
|
141
|
-
// innerRef: PropTypes.func,
|
|
142
|
-
// };
|
|
143
|
-
|
|
144
|
-
// class Autocomplete extends Component {
|
|
145
|
-
// state = {
|
|
146
|
-
// inputText: '',
|
|
147
|
-
// };
|
|
148
|
-
|
|
149
|
-
// componentDidMount() {
|
|
150
|
-
// const { defaultValue } = this.props;
|
|
151
|
-
|
|
152
|
-
// // It has to trigger its `FormGroup` as well
|
|
153
|
-
// if (defaultValue) {
|
|
154
|
-
// this.onChange(defaultValue);
|
|
155
|
-
// }
|
|
156
|
-
// }
|
|
157
|
-
|
|
158
|
-
// components = {
|
|
159
|
-
// SelectContainer,
|
|
160
|
-
// Control,
|
|
161
|
-
// DropdownIndicator: null,
|
|
162
|
-
// IndicatorsContainer: () => <div className="select-indicators" />,
|
|
163
|
-
// ValueContainer,
|
|
164
|
-
// MenuList,
|
|
165
|
-
// Option,
|
|
166
|
-
// SingleValue: () => <div className="single-value-container" />,
|
|
167
|
-
// ...this.props.components,
|
|
168
|
-
// };
|
|
169
|
-
|
|
170
|
-
// onInputChange = (inputText, { action }) => {
|
|
171
|
-
// // Do not clear on blur
|
|
172
|
-
// if (action && ['input-blur', 'menu-close'].includes(action)) {
|
|
173
|
-
// return;
|
|
174
|
-
// }
|
|
175
|
-
|
|
176
|
-
// this.setState(
|
|
177
|
-
// {
|
|
178
|
-
// inputText,
|
|
179
|
-
// },
|
|
180
|
-
// () => {
|
|
181
|
-
// if (this.props.onInputChange) {
|
|
182
|
-
// this.props.onInputChange(inputText, { action });
|
|
183
|
-
// }
|
|
184
|
-
// },
|
|
185
|
-
// );
|
|
186
|
-
// };
|
|
187
|
-
|
|
188
|
-
// onInputClear = () => {
|
|
189
|
-
// this.setState(
|
|
190
|
-
// {
|
|
191
|
-
// inputText: '',
|
|
192
|
-
// },
|
|
193
|
-
// () => {
|
|
194
|
-
// if (this.props.onInputClear) {
|
|
195
|
-
// this.props.onInputClear();
|
|
196
|
-
// }
|
|
197
|
-
// },
|
|
198
|
-
// );
|
|
199
|
-
// };
|
|
200
|
-
|
|
201
|
-
// onChange = (selected) => {
|
|
202
|
-
// this.setState(
|
|
203
|
-
// {
|
|
204
|
-
// inputText: selected.label,
|
|
205
|
-
// },
|
|
206
|
-
// () => {
|
|
207
|
-
// if (this.props.onChange) {
|
|
208
|
-
// this.props.onChange(selected);
|
|
209
|
-
// }
|
|
210
|
-
// },
|
|
211
|
-
// );
|
|
212
|
-
// };
|
|
213
|
-
|
|
214
|
-
// render() {
|
|
215
|
-
// const { inputText } = this.state;
|
|
216
|
-
// const {
|
|
217
|
-
// options,
|
|
218
|
-
// placeholder,
|
|
219
|
-
// menuIsOpen,
|
|
220
|
-
// ...rest
|
|
221
|
-
// } = this.props;
|
|
222
|
-
|
|
223
|
-
// const isLabelActive = !!inputText;
|
|
224
|
-
|
|
225
|
-
// const classNames = isLabelActive ? 'active' : '';
|
|
226
|
-
|
|
227
|
-
// return (
|
|
228
|
-
// <Fragment>
|
|
229
|
-
// <ReactSelect
|
|
230
|
-
// {...rest}
|
|
231
|
-
// onInputChange={this.onInputChange}
|
|
232
|
-
// onInputClear={this.onInputClear}
|
|
233
|
-
// onChange={this.onChange}
|
|
234
|
-
// placeholder={null}
|
|
235
|
-
// hideSelectedOptions={false}
|
|
236
|
-
// backspaceRemovesValue={false}
|
|
237
|
-
// isSearchable={true}
|
|
238
|
-
// options={options}
|
|
239
|
-
// components={this.components}
|
|
240
|
-
// inputValue={inputText}
|
|
241
|
-
// aria-label={placeholder}
|
|
242
|
-
// />
|
|
243
|
-
// <label className={classNames} style={{ pointerEvents: 'none' }}>
|
|
244
|
-
// {placeholder}
|
|
245
|
-
// </label>
|
|
246
|
-
// </Fragment>
|
|
247
|
-
// );
|
|
248
|
-
// }
|
|
249
|
-
// }
|
|
250
|
-
|
|
251
|
-
// export default Autocomplete;
|
|
252
|
-
|
|
253
|
-
// Autocomplete.propTypes = SelectPropTypes;
|
|
254
|
-
|
|
255
|
-
// Autocomplete.defaultProps = SelectBase.defaultProps;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import classNames from 'classnames'
|
|
4
|
-
|
|
5
|
-
const propTypes = {
|
|
6
|
-
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
7
|
-
className: PropTypes.string
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const defaultProps = {
|
|
11
|
-
tag: 'div'
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const AvatarContainer = props => {
|
|
15
|
-
const { className, tag: Tag, ...attributes } = props
|
|
16
|
-
const wrapperClasses = classNames(
|
|
17
|
-
'd-flex align-items-center justify-content-around flex-wrap flex-sm-nowrap',
|
|
18
|
-
className
|
|
19
|
-
)
|
|
20
|
-
return <Tag {...attributes} className={wrapperClasses} />
|
|
21
|
-
}
|
|
22
|
-
AvatarContainer.propTypes = propTypes
|
|
23
|
-
AvatarContainer.defaultProps = defaultProps
|
|
24
|
-
export default AvatarContainer
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import classNames from 'classnames'
|
|
4
|
-
|
|
5
|
-
const propTypes = {
|
|
6
|
-
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
7
|
-
className: PropTypes.string
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const defaultProps = {
|
|
11
|
-
tag: 'div'
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const AvatarExtraText = props => {
|
|
15
|
-
const { className, tag: Tag, ...attributes } = props
|
|
16
|
-
const wrapperClass = classNames('extra-text', className)
|
|
17
|
-
return <Tag className={wrapperClass} {...attributes} />
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
AvatarExtraText.propTypes = propTypes
|
|
21
|
-
AvatarExtraText.defaultProps = defaultProps
|
|
22
|
-
export default AvatarExtraText
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import classNames from 'classnames'
|
|
4
|
-
|
|
5
|
-
const propTypes = {
|
|
6
|
-
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
7
|
-
className: PropTypes.string,
|
|
8
|
-
wrapperClassName: PropTypes.string
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const defaultProps = {
|
|
12
|
-
tag: 'ul'
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const AvatarGroupContainer = props => {
|
|
16
|
-
const { className, tag: Tag, wrapperClassName, ...attributes } = props
|
|
17
|
-
const wrapperClasses = classNames('avatar-group-stacked', wrapperClassName)
|
|
18
|
-
return <Tag {...attributes} className={wrapperClasses}></Tag>
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
AvatarGroupContainer.propTypes = propTypes
|
|
22
|
-
AvatarGroupContainer.defaultProps = defaultProps
|
|
23
|
-
export default AvatarGroupContainer
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import classNames from 'classnames'
|
|
4
|
-
|
|
5
|
-
const propTypes = {
|
|
6
|
-
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
7
|
-
className: PropTypes.string,
|
|
8
|
-
href: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
9
|
-
color: PropTypes.string,
|
|
10
|
-
size: PropTypes.string
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const defaultProps = {
|
|
14
|
-
tag: 'div'
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const AvatarIcon = props => {
|
|
18
|
-
const { className, tag: Tag, size, href, color, ...attributes } = props
|
|
19
|
-
const typeClass = classNames('avatar', {
|
|
20
|
-
[`size-${size}`]: size,
|
|
21
|
-
[`avatar-${color}`]: color
|
|
22
|
-
})
|
|
23
|
-
if (href) {
|
|
24
|
-
return <a href={href} {...attributes} className={typeClass}></a>
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return <Tag {...attributes} className={typeClass} />
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
AvatarIcon.propTypes = propTypes
|
|
31
|
-
AvatarIcon.defaultProps = defaultProps
|
|
32
|
-
export default AvatarIcon
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import classNames from 'classnames'
|
|
4
|
-
|
|
5
|
-
const propTypes = {
|
|
6
|
-
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
7
|
-
className: PropTypes.string,
|
|
8
|
-
presence: PropTypes.string
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const defaultProps = {
|
|
12
|
-
tag: 'div'
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const AvatarPresence = props => {
|
|
16
|
-
const { className, tag: Tag, presence, ...attributes } = props
|
|
17
|
-
const typeClass = classNames('avatar-presence', {
|
|
18
|
-
[`${presence}`]: presence
|
|
19
|
-
})
|
|
20
|
-
return <Tag {...attributes} className={typeClass} />
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
AvatarPresence.propTypes = propTypes
|
|
24
|
-
AvatarPresence.defaultProps = defaultProps
|
|
25
|
-
export default AvatarPresence
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import classNames from 'classnames'
|
|
4
|
-
|
|
5
|
-
const propTypes = {
|
|
6
|
-
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
7
|
-
className: PropTypes.string,
|
|
8
|
-
status: PropTypes.string
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const defaultProps = {
|
|
12
|
-
tag: 'div'
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const AvatarStatus = props => {
|
|
16
|
-
const { className, tag: Tag, status, ...attributes } = props
|
|
17
|
-
const typeClass = classNames('avatar-status', {
|
|
18
|
-
[`${status}`]: status
|
|
19
|
-
})
|
|
20
|
-
return <Tag {...attributes} className={typeClass} />
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
AvatarStatus.propTypes = propTypes
|
|
24
|
-
AvatarStatus.defaultProps = defaultProps
|
|
25
|
-
export default AvatarStatus
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import classNames from 'classnames'
|
|
4
|
-
|
|
5
|
-
const propTypes = {
|
|
6
|
-
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
7
|
-
className: PropTypes.string,
|
|
8
|
-
extra: PropTypes.string
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const defaultProps = {
|
|
12
|
-
tag: 'div'
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const AvatarWrapper = props => {
|
|
16
|
-
const { className, tag: Tag, extra, ...attributes } = props
|
|
17
|
-
const wrapperClass = classNames('avatar-wrapper', className, {
|
|
18
|
-
[`avatar-extra-${extra}`]: extra
|
|
19
|
-
})
|
|
20
|
-
return <Tag {...attributes} className={wrapperClass} />
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
AvatarWrapper.propTypes = propTypes
|
|
24
|
-
AvatarWrapper.defaultProps = defaultProps
|
|
25
|
-
export default AvatarWrapper
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import { Badge as BadgeReact } from 'reactstrap'
|
|
4
|
-
|
|
5
|
-
const propTypes = {
|
|
6
|
-
color: PropTypes.string,
|
|
7
|
-
pill: PropTypes.bool,
|
|
8
|
-
tag: PropTypes.string,
|
|
9
|
-
children: PropTypes.node,
|
|
10
|
-
cssModule: PropTypes.object,
|
|
11
|
-
className: PropTypes.string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const defaultProps = {
|
|
15
|
-
color: 'secondary',
|
|
16
|
-
pill: false,
|
|
17
|
-
tag: 'span'
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const Badge = props => {
|
|
21
|
-
const { children } = props
|
|
22
|
-
return <BadgeReact {...props}>{children}</BadgeReact>
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
Badge.propTypes = propTypes
|
|
26
|
-
Badge.defaultProps = defaultProps
|
|
27
|
-
|
|
28
|
-
export default Badge
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import classNames from 'classnames'
|
|
4
|
-
|
|
5
|
-
const propTypes = {
|
|
6
|
-
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
7
|
-
className: PropTypes.string
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const defaultProps = {
|
|
11
|
-
tag: 'nav'
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const BottomNav = props => {
|
|
15
|
-
const { tag: Tag, ...attributes } = props
|
|
16
|
-
const wrapperClasses = classNames('bottom-nav')
|
|
17
|
-
return (
|
|
18
|
-
<Tag className={wrapperClasses}>
|
|
19
|
-
<ul {...attributes} />
|
|
20
|
-
</Tag>
|
|
21
|
-
)
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
BottomNav.propTypes = propTypes
|
|
25
|
-
BottomNav.defaultProps = defaultProps
|
|
26
|
-
|
|
27
|
-
export default BottomNav
|