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
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import React, { Component } from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import Transition from 'react-transition-group/Transition'
|
|
4
|
-
|
|
5
|
-
import { Util, Button } from 'reactstrap'
|
|
6
|
-
|
|
7
|
-
const {
|
|
8
|
-
TransitionTimeouts,
|
|
9
|
-
TransitionPropTypeKeys,
|
|
10
|
-
TransitionStatuses,
|
|
11
|
-
pick,
|
|
12
|
-
omit
|
|
13
|
-
} = Util
|
|
14
|
-
|
|
15
|
-
const propTypes = {
|
|
16
|
-
...Transition.propTypes, // eslint-disable-line react/forbid-foreign-prop-types
|
|
17
|
-
children: PropTypes.oneOfType([
|
|
18
|
-
PropTypes.arrayOf(PropTypes.node),
|
|
19
|
-
PropTypes.node
|
|
20
|
-
]),
|
|
21
|
-
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
22
|
-
className: PropTypes.string,
|
|
23
|
-
onClose: PropTypes.func,
|
|
24
|
-
isOpen: PropTypes.bool
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const defaultProps = {
|
|
28
|
-
...Transition.defaultProps,
|
|
29
|
-
timeout: TransitionTimeouts.Collapse,
|
|
30
|
-
tag: 'div'
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const transitionStatusToClassHash = {
|
|
34
|
-
[TransitionStatuses.ENTERING]: 'navbar-collapsable d-block',
|
|
35
|
-
[TransitionStatuses.ENTERED]: 'navbar-collapsable d-block expanded',
|
|
36
|
-
[TransitionStatuses.EXITING]: 'navbar-collapsable d-block',
|
|
37
|
-
[TransitionStatuses.EXITED]: 'navbar-collapsable'
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const defaultStyle = {
|
|
41
|
-
transition: '400ms ease-in-out',
|
|
42
|
-
transitionProperty: 'opacity'
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const transitionStyles = {
|
|
46
|
-
entering: {
|
|
47
|
-
opacity: 0
|
|
48
|
-
},
|
|
49
|
-
entered: {
|
|
50
|
-
opacity: 1
|
|
51
|
-
},
|
|
52
|
-
exiting: {
|
|
53
|
-
opacity: 0
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
function getTransitionClass(status) {
|
|
58
|
-
return transitionStatusToClassHash[status] || ''
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export default class Offcanvas extends Component {
|
|
62
|
-
render() {
|
|
63
|
-
const { tag: Tag, children, isOpen, onClose, ...attributes } = this.props
|
|
64
|
-
|
|
65
|
-
const transitionProps = pick(attributes, TransitionPropTypeKeys)
|
|
66
|
-
const childProps = omit(attributes, TransitionPropTypeKeys)
|
|
67
|
-
|
|
68
|
-
return (
|
|
69
|
-
<Transition {...transitionProps} in={isOpen}>
|
|
70
|
-
{status => {
|
|
71
|
-
const transitionClass = getTransitionClass(status)
|
|
72
|
-
const currentStyles = transitionStyles[status]
|
|
73
|
-
|
|
74
|
-
return (
|
|
75
|
-
<div
|
|
76
|
-
className={transitionClass}
|
|
77
|
-
style={{
|
|
78
|
-
...defaultStyle,
|
|
79
|
-
...childProps.style,
|
|
80
|
-
...currentStyles
|
|
81
|
-
}}
|
|
82
|
-
{...childProps}>
|
|
83
|
-
<div className="close-div" onClick={onClose}>
|
|
84
|
-
<Button className="close-menu" color="">
|
|
85
|
-
<span className="it-close" />
|
|
86
|
-
close
|
|
87
|
-
</Button>
|
|
88
|
-
</div>
|
|
89
|
-
<div className="menu-wrapper">
|
|
90
|
-
<Tag>{children}</Tag>
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
93
|
-
)
|
|
94
|
-
}}
|
|
95
|
-
</Transition>
|
|
96
|
-
)
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
Offcanvas.propTypes = propTypes
|
|
101
|
-
Offcanvas.defaultProps = defaultProps
|
|
@@ -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
|
-
children: PropTypes.node,
|
|
7
|
-
className: PropTypes.string,
|
|
8
|
-
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
9
|
-
'aria-label': PropTypes.string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const defaultProps = {
|
|
13
|
-
tag: 'nav',
|
|
14
|
-
'aria-label': 'pagination'
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const Pager = props => {
|
|
18
|
-
const { children, className, tag: Tag, 'aria-label': label } = props
|
|
19
|
-
|
|
20
|
-
const classes = classNames(className, 'pagination-wrapper')
|
|
21
|
-
|
|
22
|
-
return (
|
|
23
|
-
<Tag className={classes} aria-label={label}>
|
|
24
|
-
{children}
|
|
25
|
-
</Tag>
|
|
26
|
-
)
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
Pager.propTypes = propTypes
|
|
30
|
-
Pager.defaultProps = defaultProps
|
|
31
|
-
|
|
32
|
-
export default Pager
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import classNames from 'classnames'
|
|
4
|
-
|
|
5
|
-
const propTypes = {
|
|
6
|
-
className: PropTypes.string,
|
|
7
|
-
size: PropTypes.string,
|
|
8
|
-
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string])
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const defaultProps = {
|
|
12
|
-
tag: 'ul'
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const PagerList = props => {
|
|
16
|
-
const { className, size, tag: Tag, ...attributes } = props
|
|
17
|
-
|
|
18
|
-
const listClasses = classNames(className, 'pagination', {
|
|
19
|
-
[`pagination-${size}`]: !!size
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
return <Tag {...attributes} className={listClasses} />
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
PagerList.propTypes = propTypes
|
|
26
|
-
PagerList.defaultProps = defaultProps
|
|
27
|
-
|
|
28
|
-
export default PagerList
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import React, { Component, Fragment } from 'react'
|
|
2
|
-
|
|
3
|
-
import Input from '../Input/Input'
|
|
4
|
-
|
|
5
|
-
class PasswordInput extends Component {
|
|
6
|
-
state = {
|
|
7
|
-
showPassword: false
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
static defaultProps = {
|
|
11
|
-
type: 'password'
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
onPasswordToggle = () => {
|
|
15
|
-
this.setState(prevState => ({
|
|
16
|
-
showPassword: !prevState.showPassword
|
|
17
|
-
}))
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
render() {
|
|
21
|
-
const { showPassword } = this.state
|
|
22
|
-
const { type, ...rest } = this.props
|
|
23
|
-
|
|
24
|
-
const classNames = ['btn-eye', showPassword ? 'eye-off' : 'eye-on'].join(
|
|
25
|
-
' '
|
|
26
|
-
)
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<Fragment>
|
|
30
|
-
<span className={classNames} onClick={this.onPasswordToggle} />
|
|
31
|
-
<Input {...rest} type={showPassword ? 'text' : type} />
|
|
32
|
-
</Fragment>
|
|
33
|
-
)
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
PasswordInput.propTypes = {
|
|
38
|
-
...Input.propTypes
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export default PasswordInput
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import React, { Component } from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
|
|
4
|
-
const defaultSteps = [
|
|
5
|
-
{
|
|
6
|
-
score: 0,
|
|
7
|
-
label: 'inserisci almeno 8 caratteri e una lettera maiuscola',
|
|
8
|
-
className: 'danger'
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
score: 1,
|
|
12
|
-
label: 'password troppo debole',
|
|
13
|
-
className: 'danger'
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
score: 25,
|
|
17
|
-
label: 'password debole',
|
|
18
|
-
className: 'danger'
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
score: 50,
|
|
22
|
-
label: 'password sicura',
|
|
23
|
-
className: 'warning'
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
score: 75,
|
|
27
|
-
label: 'password molto sicura',
|
|
28
|
-
className: 'success'
|
|
29
|
-
}
|
|
30
|
-
]
|
|
31
|
-
|
|
32
|
-
class PasswordMeter extends Component {
|
|
33
|
-
static defaultProps = {
|
|
34
|
-
score: 0,
|
|
35
|
-
steps: defaultSteps
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
render() {
|
|
39
|
-
const { steps, score } = this.props
|
|
40
|
-
|
|
41
|
-
const currentStep = steps
|
|
42
|
-
.filter(step => step.score <= score)
|
|
43
|
-
.reduce((acc, current) => (acc.score > current.score ? acc : current))
|
|
44
|
-
|
|
45
|
-
const { label, className } = currentStep
|
|
46
|
-
|
|
47
|
-
return (
|
|
48
|
-
<div className="psw-wrapper">
|
|
49
|
-
<span className={`psw-text text-${className} ${className}`}>
|
|
50
|
-
{label}
|
|
51
|
-
</span>
|
|
52
|
-
<div className="progress rounded-0 position-relative psw-meter">
|
|
53
|
-
<div className="row position-absolute w-100 m-0">
|
|
54
|
-
<div className="col-3 border-left border-right border-white" />
|
|
55
|
-
<div className="col-3 border-left border-right border-white" />
|
|
56
|
-
<div className="col-3 border-left border-right border-white" />
|
|
57
|
-
<div className="col-3 border-left border-right border-white" />
|
|
58
|
-
</div>
|
|
59
|
-
<div
|
|
60
|
-
className={`progress-bar bg-${className} ${className}`}
|
|
61
|
-
style={{ width: `${score}%` }}
|
|
62
|
-
/>
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
)
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
PasswordMeter.propTypes = {
|
|
70
|
-
score: PropTypes.number,
|
|
71
|
-
steps: PropTypes.arrayOf(
|
|
72
|
-
PropTypes.shape({
|
|
73
|
-
score: PropTypes.number,
|
|
74
|
-
label: PropTypes.string,
|
|
75
|
-
className: PropTypes.string
|
|
76
|
-
})
|
|
77
|
-
)
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export default PasswordMeter
|
|
@@ -1,88 +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
|
-
value: PropTypes.number,
|
|
9
|
-
label: PropTypes.string,
|
|
10
|
-
indeterminate: PropTypes.bool,
|
|
11
|
-
color: PropTypes.string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const defaultProps = {
|
|
15
|
-
tag: 'div',
|
|
16
|
-
role: 'progressbar',
|
|
17
|
-
indeterminate: false
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
class Progress extends React.Component {
|
|
21
|
-
render() {
|
|
22
|
-
const {
|
|
23
|
-
className,
|
|
24
|
-
tag: Tag,
|
|
25
|
-
value,
|
|
26
|
-
label,
|
|
27
|
-
indeterminate,
|
|
28
|
-
color,
|
|
29
|
-
...attributes
|
|
30
|
-
} = this.props
|
|
31
|
-
const wrapperClasses = classNames('progress-bar-wrapper')
|
|
32
|
-
const secondaryWrapperClasses = classNames(
|
|
33
|
-
className,
|
|
34
|
-
indeterminate ? 'progress-indeterminate' : false,
|
|
35
|
-
color ? 'progress-color' : false,
|
|
36
|
-
'progress'
|
|
37
|
-
)
|
|
38
|
-
const classes = classNames(
|
|
39
|
-
className,
|
|
40
|
-
'progress-bar',
|
|
41
|
-
color ? `bg-${this.props.color}` : false
|
|
42
|
-
)
|
|
43
|
-
|
|
44
|
-
if (label && value) {
|
|
45
|
-
return (
|
|
46
|
-
<Tag className={wrapperClasses}>
|
|
47
|
-
<div className="progress-bar-label">
|
|
48
|
-
<span className="sr-only">{this.props.label}</span>
|
|
49
|
-
{this.props.value + '%'}
|
|
50
|
-
</div>
|
|
51
|
-
<Tag className={secondaryWrapperClasses}>
|
|
52
|
-
<div
|
|
53
|
-
{...attributes}
|
|
54
|
-
className={classes}
|
|
55
|
-
role="progressbar"
|
|
56
|
-
style={{ width: this.props.value + '%' }}
|
|
57
|
-
aria-valuenow={this.props.value}
|
|
58
|
-
aria-valuemin="0"
|
|
59
|
-
aria-valuemax="100"
|
|
60
|
-
/>
|
|
61
|
-
</Tag>
|
|
62
|
-
</Tag>
|
|
63
|
-
)
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
return (
|
|
67
|
-
<Tag className={secondaryWrapperClasses}>
|
|
68
|
-
<div className="progress-bar-label">
|
|
69
|
-
<span className="sr-only">{this.props.label}</span>
|
|
70
|
-
</div>
|
|
71
|
-
<div
|
|
72
|
-
{...attributes}
|
|
73
|
-
className={classes}
|
|
74
|
-
role="progressbar"
|
|
75
|
-
style={{ width: this.props.value + '%' }}
|
|
76
|
-
aria-valuenow={this.props.value}
|
|
77
|
-
aria-valuemin="0"
|
|
78
|
-
aria-valuemax="100"
|
|
79
|
-
/>
|
|
80
|
-
</Tag>
|
|
81
|
-
)
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
Progress.propTypes = propTypes
|
|
86
|
-
Progress.defaultProps = defaultProps
|
|
87
|
-
|
|
88
|
-
export default Progress
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import classNames from 'classnames'
|
|
4
|
-
|
|
5
|
-
import { FormGroup, Label } from 'reactstrap'
|
|
6
|
-
import Input from '../Input/Input'
|
|
7
|
-
import Icon from '../Icon/Icon'
|
|
8
|
-
import { noop } from '../utils'
|
|
9
|
-
|
|
10
|
-
const propTypes = {
|
|
11
|
-
/** La lista di id per ciascun elemento intero del Rating. La lista deve essere ordinata dal rating 1 al rating 5. */
|
|
12
|
-
inputs: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
13
|
-
/** Il campo "label" è impostato di default su "Valuta ${n} stelle su 5", ma può essere personalizzato con questa funzione che riceve il numero input come argomento `function (n: number) => string`. */
|
|
14
|
-
labelTemplate: PropTypes.func,
|
|
15
|
-
/** Da utilizzare in caso legenda principale del Rating. Passare una componente React da mostrare come legenda (all'interno del tag `<legend>`). It is possible also to show the legend of screen readers only */
|
|
16
|
-
legend: PropTypes.oneOf([
|
|
17
|
-
PropTypes.node,
|
|
18
|
-
PropTypes.string,
|
|
19
|
-
PropTypes.shape({ content: PropTypes.string, srOnly: PropTypes.bool })
|
|
20
|
-
]),
|
|
21
|
-
/** Mostra la leggenda solo ai dispositivi screen reader */
|
|
22
|
-
|
|
23
|
-
/** Parametro name da dare all'input */
|
|
24
|
-
name: PropTypes.string,
|
|
25
|
-
/** Classi aggiuntive da usare per il componente wrapper del Rating */
|
|
26
|
-
wrapperClassName: PropTypes.string,
|
|
27
|
-
/** Classi aggiuntive da usare per ciascun elemento all'interno del componente Rating */
|
|
28
|
-
className: PropTypes.string,
|
|
29
|
-
/** Callback chiamata ad ogni cambio di valore di rating. Il nuovo valore ed il name verranno passati: `function (n, name) => void` */
|
|
30
|
-
onChangeRating: PropTypes.func,
|
|
31
|
-
/** Rende il componente read-only */
|
|
32
|
-
readOnly: PropTypes.bool,
|
|
33
|
-
/** Il valore corrente del componente */
|
|
34
|
-
value: PropTypes.number
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const defaultProps = {
|
|
38
|
-
onChangeRating: (value, name) => {},
|
|
39
|
-
labelTemplate: value => `Valuta ${value} stelle su 5`
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const Rating = props => {
|
|
43
|
-
const {
|
|
44
|
-
className,
|
|
45
|
-
inputs,
|
|
46
|
-
labelTemplate,
|
|
47
|
-
legend,
|
|
48
|
-
name,
|
|
49
|
-
onChangeRating,
|
|
50
|
-
readOnly,
|
|
51
|
-
value,
|
|
52
|
-
wrapperClassName,
|
|
53
|
-
...attributes
|
|
54
|
-
} = props
|
|
55
|
-
|
|
56
|
-
// Input data
|
|
57
|
-
// On the DOM we have to go from 5 to 1
|
|
58
|
-
const safeInputs = (inputs || []).reverse()
|
|
59
|
-
|
|
60
|
-
// Fields
|
|
61
|
-
const labelFn = labelTemplate
|
|
62
|
-
|
|
63
|
-
const onChange = readOnly ? onChangeRating : noop
|
|
64
|
-
|
|
65
|
-
const wrapperClasses = classNames(wrapperClassName, {
|
|
66
|
-
'rating-read-only': readOnly,
|
|
67
|
-
'rating-label': legend
|
|
68
|
-
})
|
|
69
|
-
const fieldClasses = classNames(className)
|
|
70
|
-
const extraFieldAttrs = readOnly ? { ariaHidden: 'true' } : {}
|
|
71
|
-
|
|
72
|
-
// Legend
|
|
73
|
-
const isLegendString = typeof legend === 'string'
|
|
74
|
-
const isLegendObject =
|
|
75
|
-
legend != null &&
|
|
76
|
-
typeof legend === 'object' &&
|
|
77
|
-
typeof legend.content === 'string'
|
|
78
|
-
|
|
79
|
-
const legendClass = classNames({
|
|
80
|
-
'sr-only': isLegendObject && legend.srOnly
|
|
81
|
-
})
|
|
82
|
-
|
|
83
|
-
const legendText = isLegendObject ? legend.content : legend
|
|
84
|
-
|
|
85
|
-
const legendContent =
|
|
86
|
-
isLegendObject || isLegendString ? (
|
|
87
|
-
<span className={legendClass}>{legendText}</span>
|
|
88
|
-
) : (
|
|
89
|
-
legend
|
|
90
|
-
)
|
|
91
|
-
|
|
92
|
-
return (
|
|
93
|
-
<FormGroup
|
|
94
|
-
cssModule={{ 'form-group': 'rating' }}
|
|
95
|
-
tag="fieldset"
|
|
96
|
-
className={wrapperClasses}
|
|
97
|
-
{...attributes}>
|
|
98
|
-
{legend && <legend>{legendContent}</legend>}
|
|
99
|
-
{safeInputs.map((id, i) => {
|
|
100
|
-
const currentValue = 5 - i
|
|
101
|
-
|
|
102
|
-
return (
|
|
103
|
-
<>
|
|
104
|
-
<Input
|
|
105
|
-
type="radio"
|
|
106
|
-
id={id}
|
|
107
|
-
name={name}
|
|
108
|
-
value={currentValue}
|
|
109
|
-
cssModule={{ 'form-control': ' ' }}
|
|
110
|
-
className={fieldClasses}
|
|
111
|
-
onClick={() => onChange(currentValue, name)}
|
|
112
|
-
checked={value === currentValue}
|
|
113
|
-
disabled={readOnly}
|
|
114
|
-
{...extraFieldAttrs}
|
|
115
|
-
/>
|
|
116
|
-
<Label className="full" for={id}>
|
|
117
|
-
<Icon icon="it-star-full" size="sm" />
|
|
118
|
-
<span className="sr-only">{labelFn(5 - i)}</span>
|
|
119
|
-
</Label>
|
|
120
|
-
</>
|
|
121
|
-
)
|
|
122
|
-
})}
|
|
123
|
-
</FormGroup>
|
|
124
|
-
)
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
Rating.propTypes = propTypes
|
|
128
|
-
Rating.defaultProps = defaultProps
|
|
129
|
-
|
|
130
|
-
export default Rating
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import classNames from 'classnames'
|
|
4
|
-
|
|
5
|
-
const propTypes = {
|
|
6
|
-
muted: PropTypes.string,
|
|
7
|
-
color: PropTypes.string,
|
|
8
|
-
neutral: PropTypes.string,
|
|
9
|
-
image: PropTypes.string,
|
|
10
|
-
className: PropTypes.string
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const Section = props => {
|
|
14
|
-
const {
|
|
15
|
-
muted,
|
|
16
|
-
color,
|
|
17
|
-
neutral,
|
|
18
|
-
image,
|
|
19
|
-
className,
|
|
20
|
-
|
|
21
|
-
...attributes
|
|
22
|
-
} = props
|
|
23
|
-
const { children, ...rest } = attributes
|
|
24
|
-
|
|
25
|
-
const classes = classNames('section', className, {
|
|
26
|
-
'section-muted': muted,
|
|
27
|
-
[`section-${color}`]: color,
|
|
28
|
-
'section-neutral': neutral,
|
|
29
|
-
'section-image': image
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
const innerClasses = classNames('section-content', className)
|
|
33
|
-
|
|
34
|
-
const styleClass = {
|
|
35
|
-
backgroundImageClass: {
|
|
36
|
-
'background-image': [`url(${image})`]
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
<div className={classes} style={styleClass.backgroundImageClass} {...rest}>
|
|
42
|
-
<div className={innerClasses}>{children}</div>
|
|
43
|
-
</div>
|
|
44
|
-
)
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
Section.propTypes = propTypes
|
|
48
|
-
|
|
49
|
-
export default Section
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
import PropTypes from 'prop-types'
|
|
4
|
-
import classname from 'classnames'
|
|
5
|
-
|
|
6
|
-
const Separator = ({ colorTop, colorBottom, classNames }) => {
|
|
7
|
-
const styleTop = classname('Separator-room', colorTop, classNames.top)
|
|
8
|
-
const styleBottom = classname(
|
|
9
|
-
'Separator Separator--up',
|
|
10
|
-
colorBottom,
|
|
11
|
-
classNames.bottom
|
|
12
|
-
)
|
|
13
|
-
return (
|
|
14
|
-
<div>
|
|
15
|
-
<hr className={styleTop} />
|
|
16
|
-
<hr className={styleBottom} />
|
|
17
|
-
</div>
|
|
18
|
-
)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
Separator.propTypes = {
|
|
22
|
-
colorTop: PropTypes.string,
|
|
23
|
-
colorBottom: PropTypes.string,
|
|
24
|
-
classNames: PropTypes.shape({
|
|
25
|
-
top: PropTypes.string,
|
|
26
|
-
bottom: PropTypes.string
|
|
27
|
-
})
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
Separator.defaultProps = {
|
|
31
|
-
classNames: {}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export default Separator
|
|
@@ -1,53 +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
|
-
secondary: PropTypes.bool,
|
|
9
|
-
left: PropTypes.bool,
|
|
10
|
-
right: PropTypes.bool,
|
|
11
|
-
dark: PropTypes.bool
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const defaultProps = {
|
|
15
|
-
tag: 'div'
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const Sidebar = props => {
|
|
19
|
-
const {
|
|
20
|
-
className,
|
|
21
|
-
tag: Tag,
|
|
22
|
-
secondary,
|
|
23
|
-
left,
|
|
24
|
-
right,
|
|
25
|
-
dark,
|
|
26
|
-
...attributes
|
|
27
|
-
} = props
|
|
28
|
-
const wrapperClasses = classNames(
|
|
29
|
-
className,
|
|
30
|
-
left ? 'it-line-left-side' : false,
|
|
31
|
-
right ? 'it-line-right-side' : false,
|
|
32
|
-
dark ? 'theme-dark' : false,
|
|
33
|
-
'sidebar-wrapper'
|
|
34
|
-
)
|
|
35
|
-
|
|
36
|
-
const wrapperClassesLinkList = classNames(
|
|
37
|
-
secondary ? 'linklist-secondary' : false,
|
|
38
|
-
'sidebar-linklist-wrapper'
|
|
39
|
-
)
|
|
40
|
-
if (secondary) {
|
|
41
|
-
return <Tag {...attributes} className={wrapperClassesLinkList} />
|
|
42
|
-
}
|
|
43
|
-
return (
|
|
44
|
-
<Tag className={wrapperClasses}>
|
|
45
|
-
<Tag {...attributes} className={wrapperClassesLinkList} />
|
|
46
|
-
</Tag>
|
|
47
|
-
)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
Sidebar.propTypes = propTypes
|
|
51
|
-
Sidebar.defaultProps = defaultProps
|
|
52
|
-
|
|
53
|
-
export default Sidebar
|
|
@@ -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
|
-
}
|
|
9
|
-
|
|
10
|
-
const defaultProps = {
|
|
11
|
-
tag: 'div'
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const Skiplink = props => {
|
|
15
|
-
const { className, tag: Tag, ...attributes } = props
|
|
16
|
-
|
|
17
|
-
const classes = classNames(className, 'skiplinks')
|
|
18
|
-
|
|
19
|
-
return <Tag className={classes} {...attributes} />
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
Skiplink.propTypes = propTypes
|
|
23
|
-
Skiplink.defaultProps = defaultProps
|
|
24
|
-
|
|
25
|
-
export default Skiplink
|
|
@@ -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
|
-
}
|
|
9
|
-
|
|
10
|
-
const defaultProps = {
|
|
11
|
-
tag: 'a'
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const SkiplinkItem = props => {
|
|
15
|
-
const { className, tag: Tag, ...attributes } = props
|
|
16
|
-
|
|
17
|
-
const classes = classNames(className, 'sr-only', 'sr-only-focusable')
|
|
18
|
-
|
|
19
|
-
return <Tag className={classes} {...attributes} />
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
SkiplinkItem.propTypes = propTypes
|
|
23
|
-
SkiplinkItem.defaultProps = defaultProps
|
|
24
|
-
|
|
25
|
-
export default SkiplinkItem
|