@bitrise/bitkit 10.1.0-alpha-chakra.3 → 10.1.0-alpha-breadcrumb.2
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/package.json +57 -23
- package/src/Components/Breadcrumb/Breadcrumb.stories.tsx +30 -0
- package/src/Components/Breadcrumb/Breadcrumb.theme.ts +25 -0
- package/src/Components/Breadcrumb/Breadcrumb.tsx +51 -0
- package/src/Components/Breadcrumb/BreadcrumbLink.tsx +34 -0
- package/src/Components/Dialog/Dialog.tsx +4 -1
- package/src/Components/Tabs/Tab.tsx +24 -2
- package/src/Components/Transitions/Fade.stories.tsx +26 -0
- package/src/Components/Transitions/Fade.tsx +12 -0
- package/src/Old/AddonBeam/AddonBeam.css +16 -0
- package/src/Old/AddonBeam/AddonBeam.tsx +117 -0
- package/src/Old/AddonBeam/AddonBeamLink.tsx +37 -0
- package/src/Old/AddonFooter/AddonFooter.tsx +24 -0
- package/src/Old/AppLayout/AppLayout.css +45 -0
- package/src/Old/AppLayout/AppLayout.tsx +21 -0
- package/src/Old/AppLayout/AppLayoutBody.tsx +10 -0
- package/src/Old/AppLayout/AppLayoutHeader.tsx +10 -0
- package/src/Old/AppLayout/AppLayoutMain.tsx +10 -0
- package/src/Old/AppLayout/AppLayoutSidebar.tsx +10 -0
- package/src/Old/Avatar/Avatar.css +4 -0
- package/src/Old/Avatar/Avatar.tsx +64 -0
- package/src/Old/Avatar/avatarColors.ts +26 -0
- package/src/Old/Bounds/Bounds.tsx +20 -0
- package/src/Old/Button/Button.css +249 -0
- package/src/Old/Button/Button.test.tsx +29 -0
- package/src/Old/Button/Button.tsx +55 -0
- package/src/Old/Button/ButtonSize.ts +3 -0
- package/src/Old/Button/Buttons.test.tsx +42 -0
- package/src/Old/Button/Buttons.tsx +34 -0
- package/src/Old/Button/__snapshots__/Button.test.tsx.snap +73 -0
- package/src/Old/Button/__snapshots__/Buttons.test.tsx.snap +45 -0
- package/src/Old/DatePicker/DatePicker.tsx +6 -6
- package/src/Old/DatePicker/DatePickerMonth.tsx +7 -7
- package/src/Old/Dropdown/Dropdown.tsx +5 -3
- package/src/Old/Dropdown/DropdownButton.tsx +16 -2
- package/src/Old/Dropdown/DropdownMenuItem.tsx +2 -1
- package/src/Old/Dropdown/DropdownMenuItemGroup.tsx +2 -2
- package/src/Old/ExternalLink/ExternalLink.tsx +24 -0
- package/src/Old/Icon/Icon.css +4 -0
- package/src/Old/Icon/Icon.tsx +32 -0
- package/src/Old/Icon/tsx/IconsAddOns.tsx +14 -0
- package/src/Old/Icon/tsx/IconsAddOnsColorTuorqouise.tsx +20 -0
- package/src/Old/Icon/tsx/IconsAddOnsColorViolet.tsx +20 -0
- package/src/Old/Icon/tsx/IconsAddOnsWhite.tsx +20 -0
- package/src/Old/Icon/tsx/IconsApp.tsx +16 -0
- package/src/Old/Icon/tsx/IconsArrowBack.tsx +14 -0
- package/src/Old/Icon/tsx/IconsArrowDown.tsx +21 -0
- package/src/Old/Icon/tsx/IconsArrowForward.tsx +16 -0
- package/src/Old/Icon/tsx/IconsArrowQuit.tsx +14 -0
- package/src/Old/Icon/tsx/IconsArrowUp.tsx +14 -0
- package/src/Old/Icon/tsx/IconsBackArrow.tsx +13 -0
- package/src/Old/Icon/tsx/IconsBell.tsx +16 -0
- package/src/Old/Icon/tsx/IconsBitbot.tsx +16 -0
- package/src/Old/Icon/tsx/IconsBitbotFailed.tsx +18 -0
- package/src/Old/Icon/tsx/IconsBitbucket.tsx +26 -0
- package/src/Old/Icon/tsx/IconsBitbucketFill.tsx +14 -0
- package/src/Old/Icon/tsx/IconsBitriseCertified.tsx +19 -0
- package/src/Old/Icon/tsx/IconsBook.tsx +16 -0
- package/src/Old/Icon/tsx/IconsBranchBranch.tsx +16 -0
- package/src/Old/Icon/tsx/IconsBranchCommit.tsx +14 -0
- package/src/Old/Icon/tsx/IconsBranchPull.tsx +16 -0
- package/src/Old/Icon/tsx/IconsBranchPush.tsx +21 -0
- package/src/Old/Icon/tsx/IconsBranchTag.tsx +16 -0
- package/src/Old/Icon/tsx/IconsBug.tsx +16 -0
- package/src/Old/Icon/tsx/IconsBuild.tsx +14 -0
- package/src/Old/Icon/tsx/IconsBuildstatusAborted.tsx +16 -0
- package/src/Old/Icon/tsx/IconsBuildstatusAbortedSolid.tsx +15 -0
- package/src/Old/Icon/tsx/IconsBuildstatusFailed.tsx +16 -0
- package/src/Old/Icon/tsx/IconsBuildstatusFailedSolid.tsx +15 -0
- package/src/Old/Icon/tsx/IconsBuildstatusLoading.tsx +13 -0
- package/src/Old/Icon/tsx/IconsBuildstatusLoadingAnimated.tsx +31 -0
- package/src/Old/Icon/tsx/IconsBuildstatusLoadingeeehh.tsx +13 -0
- package/src/Old/Icon/tsx/IconsBuildstatusLoadingeeehhWhite.tsx +13 -0
- package/src/Old/Icon/tsx/IconsBuildstatusNeverbuilt.tsx +14 -0
- package/src/Old/Icon/tsx/IconsBuildstatusSuccessful.tsx +16 -0
- package/src/Old/Icon/tsx/IconsBuildstatusSuccessfulSolid.tsx +15 -0
- package/src/Old/Icon/tsx/IconsCalendar.tsx +16 -0
- package/src/Old/Icon/tsx/IconsChain.tsx +16 -0
- package/src/Old/Icon/tsx/IconsChangePlan.tsx +14 -0
- package/src/Old/Icon/tsx/IconsChat.tsx +14 -0
- package/src/Old/Icon/tsx/IconsChatMessage.tsx +16 -0
- package/src/Old/Icon/tsx/IconsChevronDown.tsx +13 -0
- package/src/Old/Icon/tsx/IconsChevronLeft.tsx +16 -0
- package/src/Old/Icon/tsx/IconsChevronRight.tsx +16 -0
- package/src/Old/Icon/tsx/IconsChevronUp.tsx +15 -0
- package/src/Old/Icon/tsx/IconsClock.tsx +16 -0
- package/src/Old/Icon/tsx/IconsCloseSmall.tsx +16 -0
- package/src/Old/Icon/tsx/IconsCode.tsx +16 -0
- package/src/Old/Icon/tsx/IconsCoffee.tsx +16 -0
- package/src/Old/Icon/tsx/IconsConsole.tsx +16 -0
- package/src/Old/Icon/tsx/IconsCredit.tsx +21 -0
- package/src/Old/Icon/tsx/IconsCreditcard.tsx +16 -0
- package/src/Old/Icon/tsx/IconsDeleteNope.tsx +15 -0
- package/src/Old/Icon/tsx/IconsDeployment.tsx +14 -0
- package/src/Old/Icon/tsx/IconsDoc.tsx +16 -0
- package/src/Old/Icon/tsx/IconsDollars.tsx +16 -0
- package/src/Old/Icon/tsx/IconsDownload.tsx +16 -0
- package/src/Old/Icon/tsx/IconsDropdownArrows.tsx +16 -0
- package/src/Old/Icon/tsx/IconsDudes.tsx +14 -0
- package/src/Old/Icon/tsx/IconsDuplicate.tsx +14 -0
- package/src/Old/Icon/tsx/IconsEnterprise.tsx +19 -0
- package/src/Old/Icon/tsx/IconsErrorGeneral.tsx +16 -0
- package/src/Old/Icon/tsx/IconsFileDoc.tsx +16 -0
- package/src/Old/Icon/tsx/IconsFilePdf.tsx +16 -0
- package/src/Old/Icon/tsx/IconsFilePlist.tsx +16 -0
- package/src/Old/Icon/tsx/IconsFileZip.tsx +16 -0
- package/src/Old/Icon/tsx/IconsFilter.tsx +16 -0
- package/src/Old/Icon/tsx/IconsFlag.tsx +13 -0
- package/src/Old/Icon/tsx/IconsFolder.tsx +16 -0
- package/src/Old/Icon/tsx/IconsFullscreen.tsx +14 -0
- package/src/Old/Icon/tsx/IconsFullscreenExit.tsx +14 -0
- package/src/Old/Icon/tsx/IconsGauge.tsx +16 -0
- package/src/Old/Icon/tsx/IconsGithub.tsx +14 -0
- package/src/Old/Icon/tsx/IconsGitlab.tsx +20 -0
- package/src/Old/Icon/tsx/IconsGitlabFill.tsx +14 -0
- package/src/Old/Icon/tsx/IconsGlobe.tsx +16 -0
- package/src/Old/Icon/tsx/IconsGroup.tsx +14 -0
- package/src/Old/Icon/tsx/IconsHeart.tsx +14 -0
- package/src/Old/Icon/tsx/IconsHidePassword.tsx +19 -0
- package/src/Old/Icon/tsx/IconsHistory.tsx +14 -0
- package/src/Old/Icon/tsx/IconsImage.tsx +14 -0
- package/src/Old/Icon/tsx/IconsInfo.tsx +14 -0
- package/src/Old/Icon/tsx/IconsIntegrations.tsx +14 -0
- package/src/Old/Icon/tsx/IconsInteraction.tsx +14 -0
- package/src/Old/Icon/tsx/IconsInvoice.tsx +16 -0
- package/src/Old/Icon/tsx/IconsJapanese.tsx +15 -0
- package/src/Old/Icon/tsx/IconsKey.tsx +14 -0
- package/src/Old/Icon/tsx/IconsLaptop.tsx +13 -0
- package/src/Old/Icon/tsx/IconsLaptops.tsx +16 -0
- package/src/Old/Icon/tsx/IconsLightbulb.tsx +16 -0
- package/src/Old/Icon/tsx/IconsLock.tsx +16 -0
- package/src/Old/Icon/tsx/IconsLogin.tsx +16 -0
- package/src/Old/Icon/tsx/IconsLogout.tsx +16 -0
- package/src/Old/Icon/tsx/IconsMagnifier.tsx +16 -0
- package/src/Old/Icon/tsx/IconsMail.tsx +16 -0
- package/src/Old/Icon/tsx/IconsMenuGrid.tsx +16 -0
- package/src/Old/Icon/tsx/IconsMenuHamburger.tsx +13 -0
- package/src/Old/Icon/tsx/IconsMessage.tsx +16 -0
- package/src/Old/Icon/tsx/IconsMinusClose.tsx +10 -0
- package/src/Old/Icon/tsx/IconsMinusRemove.tsx +16 -0
- package/src/Old/Icon/tsx/IconsMobile.tsx +16 -0
- package/src/Old/Icon/tsx/IconsMonitoring.tsx +14 -0
- package/src/Old/Icon/tsx/IconsMoreHorizontal.tsx +13 -0
- package/src/Old/Icon/tsx/IconsMoreVertical.tsx +17 -0
- package/src/Old/Icon/tsx/IconsNoTie.tsx +14 -0
- package/src/Old/Icon/tsx/IconsNumero.tsx +16 -0
- package/src/Old/Icon/tsx/IconsOpenInBrowser.tsx +16 -0
- package/src/Old/Icon/tsx/IconsOverview.tsx +14 -0
- package/src/Old/Icon/tsx/IconsOwner.tsx +19 -0
- package/src/Old/Icon/tsx/IconsPause.tsx +14 -0
- package/src/Old/Icon/tsx/IconsPencil.tsx +17 -0
- package/src/Old/Icon/tsx/IconsPercent.tsx +14 -0
- package/src/Old/Icon/tsx/IconsPerson.tsx +14 -0
- package/src/Old/Icon/tsx/IconsPlatformsAndroid.tsx +16 -0
- package/src/Old/Icon/tsx/IconsPlatformsApple.tsx +16 -0
- package/src/Old/Icon/tsx/IconsPlatformsCordova.tsx +14 -0
- package/src/Old/Icon/tsx/IconsPlatformsFastlane.tsx +14 -0
- package/src/Old/Icon/tsx/IconsPlatformsFlutter.tsx +14 -0
- package/src/Old/Icon/tsx/IconsPlatformsGo.tsx +13 -0
- package/src/Old/Icon/tsx/IconsPlatformsIonic.tsx +14 -0
- package/src/Old/Icon/tsx/IconsPlatformsMacos.tsx +14 -0
- package/src/Old/Icon/tsx/IconsPlatformsNodejs.tsx +13 -0
- package/src/Old/Icon/tsx/IconsPlatformsOther.tsx +21 -0
- package/src/Old/Icon/tsx/IconsPlatformsReact.tsx +14 -0
- package/src/Old/Icon/tsx/IconsPlatformsXamarin.tsx +14 -0
- package/src/Old/Icon/tsx/IconsPlay.tsx +16 -0
- package/src/Old/Icon/tsx/IconsPlusAdd.tsx +16 -0
- package/src/Old/Icon/tsx/IconsPlusOpen.tsx +13 -0
- package/src/Old/Icon/tsx/IconsPower.tsx +11 -0
- package/src/Old/Icon/tsx/IconsRefresh.tsx +13 -0
- package/src/Old/Icon/tsx/IconsRequest.tsx +14 -0
- package/src/Old/Icon/tsx/IconsResponsiveness.tsx +14 -0
- package/src/Old/Icon/tsx/IconsSave.tsx +14 -0
- package/src/Old/Icon/tsx/IconsSecurityShield.tsx +16 -0
- package/src/Old/Icon/tsx/IconsSettings.tsx +16 -0
- package/src/Old/Icon/tsx/IconsShip.tsx +14 -0
- package/src/Old/Icon/tsx/IconsShowPassword.tsx +16 -0
- package/src/Old/Icon/tsx/IconsShuffle.tsx +16 -0
- package/src/Old/Icon/tsx/IconsStability.tsx +16 -0
- package/src/Old/Icon/tsx/IconsStack.tsx +16 -0
- package/src/Old/Icon/tsx/IconsStatus.tsx +16 -0
- package/src/Old/Icon/tsx/IconsStepThirdParty.tsx +16 -0
- package/src/Old/Icon/tsx/IconsStepUpgrade.tsx +10 -0
- package/src/Old/Icon/tsx/IconsStepUpgradeCircle.tsx +11 -0
- package/src/Old/Icon/tsx/IconsStepVersionOk.tsx +11 -0
- package/src/Old/Icon/tsx/IconsSteps.tsx +14 -0
- package/src/Old/Icon/tsx/IconsStepsColorTuorqouise.tsx +14 -0
- package/src/Old/Icon/tsx/IconsStepsColorViolet.tsx +14 -0
- package/src/Old/Icon/tsx/IconsStepsWhite.tsx +14 -0
- package/src/Old/Icon/tsx/IconsStopwatch.tsx +16 -0
- package/src/Old/Icon/tsx/IconsSupport.tsx +16 -0
- package/src/Old/Icon/tsx/IconsSwitch.tsx +13 -0
- package/src/Old/Icon/tsx/IconsTestFailed.tsx +14 -0
- package/src/Old/Icon/tsx/IconsTestInconclusive.tsx +14 -0
- package/src/Old/Icon/tsx/IconsTestInfo.tsx +14 -0
- package/src/Old/Icon/tsx/IconsTestSkipped.tsx +14 -0
- package/src/Old/Icon/tsx/IconsTestSuccess.tsx +14 -0
- package/src/Old/Icon/tsx/IconsTestWarning.tsx +14 -0
- package/src/Old/Icon/tsx/IconsTick.tsx +13 -0
- package/src/Old/Icon/tsx/IconsTime.tsx +16 -0
- package/src/Old/Icon/tsx/IconsTrace.tsx +14 -0
- package/src/Old/Icon/tsx/IconsTrash.tsx +16 -0
- package/src/Old/Icon/tsx/IconsTrigger.tsx +16 -0
- package/src/Old/Icon/tsx/IconsTwitter.tsx +16 -0
- package/src/Old/Icon/tsx/IconsValidateShield.tsx +16 -0
- package/src/Old/Icon/tsx/IconsWarning.tsx +16 -0
- package/src/Old/Icon/tsx/IconsWebUi.tsx +17 -0
- package/src/Old/Icon/tsx/IconsWindow.tsx +16 -0
- package/src/Old/Icon/tsx/IconsWorkflow.tsx +16 -0
- package/src/Old/Icon/tsx/IconsWorkflowFlow.tsx +16 -0
- package/src/Old/Icon/tsx/IconsWow.tsx +16 -0
- package/src/Old/Icon/tsx/index.ts +694 -0
- package/src/Old/Input/InputLabel.tsx +3 -5
- package/src/Old/Link/Link.css +44 -0
- package/src/Old/Link/Link.tsx +30 -0
- package/src/Old/Modal/Modal.css +67 -0
- package/src/Old/Modal/Modal.tsx +117 -0
- package/src/Old/Modal/ModalBody.tsx +17 -0
- package/src/Old/Modal/ModalHeader.tsx +50 -0
- package/src/Old/Modal/ModalHeaderProgress.tsx +23 -0
- package/src/Old/Modal/ModalTitle.tsx +13 -0
- package/src/Old/Notification/Notification.tsx +4 -3
- package/src/Old/Notification/__snapshots__/Notification.test.tsx.snap +12 -8
- package/src/Old/Progress/ProgressBitbot.tsx +3 -3
- package/src/Old/Progress/ProgressButtonContent.tsx +35 -0
- package/src/Old/Ribbon/Ribbon.tsx +4 -4
- package/src/Old/Sidebar/Sidebar.css +125 -0
- package/src/Old/Sidebar/Sidebar.tsx +25 -0
- package/src/Old/Sidebar/SidebarHeader.tsx +10 -0
- package/src/Old/Sidebar/SidebarMenu.tsx +30 -0
- package/src/Old/Sidebar/SidebarMenuContext.ts +7 -0
- package/src/Old/Sidebar/SidebarMenuItem.tsx +67 -0
- package/src/Old/Sidebar/SidebarSubMenu.tsx +33 -0
- package/src/Old/Sidebar/SidebarSubMenuItem.tsx +59 -0
- package/src/Old/Status/Status404.tsx +3 -3
- package/src/Old/Status/Status500.tsx +4 -4
- package/src/Old/Table/TableHeaderCell.tsx +1 -1
- package/src/Old/Tabs/Tab.tsx +23 -0
- package/src/Old/Tabs/Tabs.css +30 -0
- package/src/Old/Tabs/Tabs.tsx +18 -0
- package/src/Old/Text/TextSizes.css +39 -0
- package/src/Old/Toggle/Toggle.tsx +1 -1
- package/src/Old/Tooltip/Tooltip.tsx +85 -0
- package/src/Old/hooks/index.ts +1 -0
- package/src/Old/hooks/useResizeObserver.ts +40 -0
- package/src/Old/variables.css +1 -0
- package/src/Old/variables.ts +3 -0
- package/src/index.ts +9 -0
- package/src/old.ts +64 -0
- package/src/theme.ts +2 -0
- package/src/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
.Link {
|
|
2
|
+
color: inherit;
|
|
3
|
+
transition-property: color;
|
|
4
|
+
transition-duration: var(--transition-duration--fast);
|
|
5
|
+
transition-timing-function: var(--transition-timing-function);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.Link--underline {
|
|
9
|
+
text-decoration: underline;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.Link--color-grape-3 {
|
|
13
|
+
color: var(--color-grape--3);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.Link--color-grape-3:hover { color: var(--color-grape--4); }
|
|
17
|
+
|
|
18
|
+
.Link--color-grape-5 {
|
|
19
|
+
color: var(--color-grape--5);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.Link--color-grape-5:hover { color: var(--color-grape--3); }
|
|
23
|
+
|
|
24
|
+
.Link--color-gray-1 {
|
|
25
|
+
color: var(--color-gray--1);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.Link--color-gray-1:hover { color: var(--color-gray--2); }
|
|
29
|
+
|
|
30
|
+
.Link--color-gray-5 {
|
|
31
|
+
color: var(--color-gray--5);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.Link--color-gray-5:hover { color: var(--color-gray--6); }
|
|
35
|
+
|
|
36
|
+
.Link--color-white {
|
|
37
|
+
color: var(--color-white);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.Link--color-white:hover { color: var(--color-gray--1); }
|
|
41
|
+
|
|
42
|
+
.Link:focus-visible {
|
|
43
|
+
box-shadow: none;
|
|
44
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import Base, { Props as BaseProps } from '../Base/Base';
|
|
4
|
+
import './Link.css';
|
|
5
|
+
|
|
6
|
+
export type TypeLinkColor = 'purple.50' | 'purple.10' | 'neutral.95' | 'neutral.70' | 'neutral.100';
|
|
7
|
+
|
|
8
|
+
export interface Props extends BaseProps {
|
|
9
|
+
Component?: BaseProps['Component'];
|
|
10
|
+
/** A subset of the base level color that has interaction styling */
|
|
11
|
+
color?: TypeLinkColor;
|
|
12
|
+
/** Applies an underline styling to the link */
|
|
13
|
+
underline?: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** Styled link component */
|
|
17
|
+
const Link: React.FunctionComponent<Props> = (props: Props) => {
|
|
18
|
+
const { className, color, underline, ...rest } = props;
|
|
19
|
+
const classes = classnames(className, 'Link', `Link--color-${color}`, {
|
|
20
|
+
'Link--underline': underline,
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
return <Base {...rest} className={classes} />;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
Link.defaultProps = {
|
|
27
|
+
Component: 'a',
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export default Link;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
|
|
2
|
+
@keyframes ModalFadeIn {
|
|
3
|
+
from { opacity: 0; }
|
|
4
|
+
to { opacity: 1; }
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@keyframes ModalFadeOut {
|
|
8
|
+
from { opacity: 1; }
|
|
9
|
+
to { opacity: 0; }
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.Body--modal-open { overflow: hidden; }
|
|
13
|
+
|
|
14
|
+
.Modal {
|
|
15
|
+
position: fixed;
|
|
16
|
+
top: 0;
|
|
17
|
+
right: 0;
|
|
18
|
+
bottom: 0;
|
|
19
|
+
left: 0;
|
|
20
|
+
background-color: var(--color-overlay--black);
|
|
21
|
+
overflow: auto;
|
|
22
|
+
z-index: var(--z-index-Modal);
|
|
23
|
+
animation-name: ModalFadeOut;
|
|
24
|
+
animation-duration: var(--transition-duration--fast);
|
|
25
|
+
animation-fill-mode: forwards;
|
|
26
|
+
animation-timing-function: var(--transition-timing-function);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.Modal__content {
|
|
30
|
+
max-width: 100%;
|
|
31
|
+
animation-duration: var(--transition-duration--fast);
|
|
32
|
+
animation-fill-mode: forwards;
|
|
33
|
+
animation-timing-function: var(--transition-timing-function);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.Modal__content,
|
|
37
|
+
.Modal__content:first-child,
|
|
38
|
+
.Modal__content:last-child {
|
|
39
|
+
margin-top: auto;
|
|
40
|
+
margin-bottom: auto;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.Modal--visible {
|
|
44
|
+
animation-name: ModalFadeIn;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.Modal--visible .Modal__content {
|
|
48
|
+
animation-duration: var(--transition-duration-base);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.ModalHeader {
|
|
52
|
+
position: relative;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.ModalHeader__progress,
|
|
56
|
+
.ModalHeader--with-separator::before {
|
|
57
|
+
position: absolute;
|
|
58
|
+
bottom: 0;
|
|
59
|
+
left: 0;
|
|
60
|
+
width: 100%;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.ModalHeader--with-separator::before {
|
|
64
|
+
content: '';
|
|
65
|
+
height: var(--size--x1);
|
|
66
|
+
background: linear-gradient(90deg, var(--color-grape--1) -28.36%, var(--color-grape--2) 100%);
|
|
67
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import { useEventListener } from '../hooks';
|
|
4
|
+
import Flex, { Props as FlexProps } from '../Flex/Flex';
|
|
5
|
+
import Portal from '../Portal/Portal';
|
|
6
|
+
import { TypeColors } from '../Base/Base';
|
|
7
|
+
import { ModalContext } from './ModalContext';
|
|
8
|
+
import './Modal.css';
|
|
9
|
+
|
|
10
|
+
const { useEffect, useState } = React;
|
|
11
|
+
|
|
12
|
+
const enableScroll = () => document.body.classList.remove('Body--modal-open');
|
|
13
|
+
const disableScroll = () => document.body.classList.add('Body--modal-open');
|
|
14
|
+
|
|
15
|
+
export interface Props extends FlexProps {
|
|
16
|
+
/**
|
|
17
|
+
* Background color of the dialog box
|
|
18
|
+
*/
|
|
19
|
+
backgroundColor?: TypeColors;
|
|
20
|
+
/**
|
|
21
|
+
* Flag to set the initial height of the dialog box to
|
|
22
|
+
* the full height available.
|
|
23
|
+
*/
|
|
24
|
+
fullHeight?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Callback that is called when clicking on the overlay
|
|
27
|
+
* area, useful for dismissing the modal.
|
|
28
|
+
*/
|
|
29
|
+
onClose?: () => void;
|
|
30
|
+
/**
|
|
31
|
+
* Flag that controls the rendering and visibility of the
|
|
32
|
+
* modal to the user.
|
|
33
|
+
*/
|
|
34
|
+
visible: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Width of the dialog box.
|
|
37
|
+
*/
|
|
38
|
+
width: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Modal component with overlay for interupting a user with
|
|
43
|
+
* an important message or question.
|
|
44
|
+
*/
|
|
45
|
+
const Modal: React.FunctionComponent<Props> = (props: Props) => {
|
|
46
|
+
const { backgroundColor, children, fullHeight, onClose, visible, width, ...rest } = props;
|
|
47
|
+
|
|
48
|
+
const [modalElement, setModalElement] = useState<HTMLElement | null>(null);
|
|
49
|
+
const [render, setRender] = useState(visible);
|
|
50
|
+
|
|
51
|
+
const classes = classnames('Modal', {
|
|
52
|
+
'Modal--visible': visible,
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
const handleClick = (event: React.SyntheticEvent) => {
|
|
56
|
+
event.stopPropagation();
|
|
57
|
+
event.nativeEvent.stopImmediatePropagation();
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
if (visible) {
|
|
62
|
+
setRender(true);
|
|
63
|
+
disableScroll();
|
|
64
|
+
} else {
|
|
65
|
+
enableScroll();
|
|
66
|
+
}
|
|
67
|
+
}, [visible]);
|
|
68
|
+
|
|
69
|
+
useEventListener(
|
|
70
|
+
modalElement,
|
|
71
|
+
'animationend',
|
|
72
|
+
() => {
|
|
73
|
+
if (!visible) {
|
|
74
|
+
setRender(false);
|
|
75
|
+
setModalElement(null);
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
[visible],
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
if (!render) {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return (
|
|
86
|
+
<Portal element={document.body}>
|
|
87
|
+
<Flex
|
|
88
|
+
alignChildrenHorizontal="middle"
|
|
89
|
+
className={classes}
|
|
90
|
+
direction="vertical"
|
|
91
|
+
innerRef={setModalElement}
|
|
92
|
+
onClick={onClose}
|
|
93
|
+
padding="x6"
|
|
94
|
+
>
|
|
95
|
+
<Flex
|
|
96
|
+
backgroundColor={backgroundColor}
|
|
97
|
+
borderRadius="x2"
|
|
98
|
+
className="Modal__content"
|
|
99
|
+
direction="vertical"
|
|
100
|
+
grow={fullHeight}
|
|
101
|
+
onClick={handleClick}
|
|
102
|
+
width={width}
|
|
103
|
+
{...rest}
|
|
104
|
+
>
|
|
105
|
+
{/* eslint-disable-next-line react/jsx-no-constructed-context-values */}
|
|
106
|
+
<ModalContext.Provider value={{ modalElement, onClose }}>{children}</ModalContext.Provider>
|
|
107
|
+
</Flex>
|
|
108
|
+
</Flex>
|
|
109
|
+
</Portal>
|
|
110
|
+
);
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
Modal.defaultProps = {
|
|
114
|
+
backgroundColor: 'neutral.100',
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
export default Modal;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import Flex, { Props as FlexProps } from '../Flex/Flex';
|
|
3
|
+
|
|
4
|
+
export type Props = FlexProps;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Modal body wrapper with preset padding.
|
|
8
|
+
*/
|
|
9
|
+
const ModalBody: React.FunctionComponent<Props> = (props: Props) => {
|
|
10
|
+
return <Flex grow {...props} />;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
ModalBody.defaultProps = {
|
|
14
|
+
padding: 'x10',
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export default ModalBody;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import { Icon } from '@bitrise/bitkit';
|
|
4
|
+
import Link from '../Link/Link';
|
|
5
|
+
import Flex, { Props as FlexProps } from '../Flex/Flex';
|
|
6
|
+
import { ModalContext } from './ModalContext';
|
|
7
|
+
|
|
8
|
+
const { useContext } = React;
|
|
9
|
+
|
|
10
|
+
export interface Props extends FlexProps {
|
|
11
|
+
gap?: FlexProps['gap'];
|
|
12
|
+
padding?: FlexProps['padding'];
|
|
13
|
+
/**
|
|
14
|
+
* Flag to toggle the gradient separator
|
|
15
|
+
*/
|
|
16
|
+
withSeparator?: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Modal header wrapper with optional gradient separator.
|
|
21
|
+
*/
|
|
22
|
+
const ModalHeader: React.FunctionComponent<Props> = (props: Props) => {
|
|
23
|
+
const { withSeparator, children, padding, paddingHorizontal = padding, paddingVertical = padding, ...rest } = props;
|
|
24
|
+
const { onClose } = useContext(ModalContext);
|
|
25
|
+
|
|
26
|
+
const classes = classnames('ModalHeader', {
|
|
27
|
+
'ModalHeader--with-separator': withSeparator,
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<Flex {...rest} className={classes} direction="horizontal">
|
|
32
|
+
<Flex grow initial="none" paddingHorizontal={paddingHorizontal} paddingVertical={paddingVertical}>
|
|
33
|
+
{children}
|
|
34
|
+
</Flex>
|
|
35
|
+
<Flex padding="x4">
|
|
36
|
+
{/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
|
|
37
|
+
<Link clickable color="purple.10" onClick={onClose}>
|
|
38
|
+
<Icon name="CloseSmall" />
|
|
39
|
+
</Link>
|
|
40
|
+
</Flex>
|
|
41
|
+
</Flex>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
ModalHeader.defaultProps = {
|
|
46
|
+
gap: 'x2',
|
|
47
|
+
padding: 'x6',
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export default ModalHeader;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import Flex, { Props as FlexProps } from '../Flex/Flex';
|
|
3
|
+
import ProgressBar from '../Progress/ProgressBar';
|
|
4
|
+
|
|
5
|
+
export interface Props extends FlexProps {
|
|
6
|
+
/** A number between 0 and 1 that represents the progress to display */
|
|
7
|
+
progress: number;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* ModalHeader progress bar
|
|
12
|
+
*/
|
|
13
|
+
const ModalHeaderProgress: React.FunctionComponent<Props> = (props: Props) => {
|
|
14
|
+
const { progress, ...rest } = props;
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<Flex {...rest} className="ModalHeader__progress">
|
|
18
|
+
<ProgressBar foregroundColor="purple.40" height="4px" progress={progress} />
|
|
19
|
+
</Flex>
|
|
20
|
+
);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default ModalHeaderProgress;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import Text, { Props as TextProps } from '../Text/Text';
|
|
3
|
+
|
|
4
|
+
export type Props = TextProps;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Modal specific styled text to appear as a title.
|
|
8
|
+
*/
|
|
9
|
+
const ModalTitle: React.FunctionComponent<Props> = (props: Props) => {
|
|
10
|
+
return <Text {...props} letterSpacing="x1" margin="x4" size="5" textColor="purple.10" weight="bold" />;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default ModalTitle;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
3
|
import Flex, { Props as FlexProps } from '../Flex/Flex';
|
|
4
|
-
import Icon
|
|
5
|
-
import
|
|
4
|
+
import Icon from '../Icon/Icon';
|
|
5
|
+
import { TypeIconName } from '../Icon/tsx';
|
|
6
|
+
import Link from '../Link/Link';
|
|
6
7
|
import ProgressSpinner from '../Progress/ProgressSpinner';
|
|
7
8
|
import './Notification.css';
|
|
8
9
|
|
|
@@ -57,7 +58,7 @@ const Notification: React.FunctionComponent<Props> = (props: Props) => {
|
|
|
57
58
|
{onRemove && (
|
|
58
59
|
<Flex>
|
|
59
60
|
{/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
|
|
60
|
-
<Link
|
|
61
|
+
<Link clickable onClick={onRemove}>
|
|
61
62
|
<Icon name="CloseSmall" />
|
|
62
63
|
</Link>
|
|
63
64
|
</Flex>
|
|
@@ -9,8 +9,9 @@ exports[`Notification default icon can be overridden 1`] = `
|
|
|
9
9
|
padding="x3"
|
|
10
10
|
>
|
|
11
11
|
<Flex>
|
|
12
|
-
<
|
|
12
|
+
<Icon
|
|
13
13
|
name="Bell"
|
|
14
|
+
size="1.5rem"
|
|
14
15
|
/>
|
|
15
16
|
</Flex>
|
|
16
17
|
<Flex
|
|
@@ -31,8 +32,9 @@ exports[`Notification default template 1`] = `
|
|
|
31
32
|
padding="x3"
|
|
32
33
|
>
|
|
33
34
|
<Flex>
|
|
34
|
-
<
|
|
35
|
+
<Icon
|
|
35
36
|
name="ErrorGeneral"
|
|
37
|
+
size="1.5rem"
|
|
36
38
|
/>
|
|
37
39
|
</Flex>
|
|
38
40
|
<Flex
|
|
@@ -53,8 +55,9 @@ exports[`Notification with onRemove has a close icon 1`] = `
|
|
|
53
55
|
padding="x3"
|
|
54
56
|
>
|
|
55
57
|
<Flex>
|
|
56
|
-
<
|
|
58
|
+
<Icon
|
|
57
59
|
name="ErrorGeneral"
|
|
60
|
+
size="1.5rem"
|
|
58
61
|
/>
|
|
59
62
|
</Flex>
|
|
60
63
|
<Flex
|
|
@@ -64,15 +67,16 @@ exports[`Notification with onRemove has a close icon 1`] = `
|
|
|
64
67
|
Content
|
|
65
68
|
</Flex>
|
|
66
69
|
<Flex>
|
|
67
|
-
<
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
<Link
|
|
71
|
+
Component="a"
|
|
72
|
+
clickable={true}
|
|
70
73
|
onClick={[Function]}
|
|
71
74
|
>
|
|
72
|
-
<
|
|
75
|
+
<Icon
|
|
73
76
|
name="CloseSmall"
|
|
77
|
+
size="1.5rem"
|
|
74
78
|
/>
|
|
75
|
-
</
|
|
79
|
+
</Link>
|
|
76
80
|
</Flex>
|
|
77
81
|
</Flex>
|
|
78
82
|
`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Props as BaseProps } from '../Base/Base';
|
|
3
|
-
import Text from '
|
|
3
|
+
import Text from '../Text/Text';
|
|
4
4
|
|
|
5
5
|
export interface Props extends BaseProps {
|
|
6
6
|
/**
|
|
@@ -62,7 +62,7 @@ const ProgressBitbot: React.FunctionComponent<Props> = (props: Props) => {
|
|
|
62
62
|
const { content, size, ...rest } = props;
|
|
63
63
|
|
|
64
64
|
return (
|
|
65
|
-
<Text {...rest} align="
|
|
65
|
+
<Text {...rest} align="middle">
|
|
66
66
|
<svg fill="currentColor" height={size} viewBox="0 0 24 24" width={size}>
|
|
67
67
|
<g fill="currentColor" fillRule="evenodd" stroke="none" strokeWidth="1">
|
|
68
68
|
<path d={dot0}>
|
|
@@ -159,7 +159,7 @@ const ProgressBitbot: React.FunctionComponent<Props> = (props: Props) => {
|
|
|
159
159
|
</svg>
|
|
160
160
|
|
|
161
161
|
{content && (
|
|
162
|
-
<Text align="
|
|
162
|
+
<Text align="middle" letterSpacing="x5" size="1" uppercase>
|
|
163
163
|
{content}
|
|
164
164
|
</Text>
|
|
165
165
|
)}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import Base from '../Base/Base';
|
|
3
|
+
import Visibility from '../Visibility/Visibility';
|
|
4
|
+
import ButtonSize from '../Button/ButtonSize';
|
|
5
|
+
import ProgressSpinner from './ProgressSpinner';
|
|
6
|
+
|
|
7
|
+
export interface Props {
|
|
8
|
+
progressing: boolean;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
size?: ButtonSize;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* A progress indicator action button that is useful
|
|
15
|
+
* to provide inline feedback that after a user action,
|
|
16
|
+
* something is happening.
|
|
17
|
+
*/
|
|
18
|
+
const ProgressButtonContent: React.FunctionComponent<Props> = (props: Props) => {
|
|
19
|
+
const { children, progressing, size } = props;
|
|
20
|
+
const gap = size === 'small' ? 'x1' : 'x2';
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<Base container>
|
|
24
|
+
<Visibility alignChildren="middle" direction="horizontal" gap={gap} visible={!progressing}>
|
|
25
|
+
{children}
|
|
26
|
+
</Visibility>
|
|
27
|
+
|
|
28
|
+
<Visibility absolute="center" visible={progressing}>
|
|
29
|
+
{progressing && <ProgressSpinner size="1.5rem" />}
|
|
30
|
+
</Visibility>
|
|
31
|
+
</Base>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export default ProgressButtonContent;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
3
|
import Flex, { Props as FlexProps } from '../Flex/Flex';
|
|
4
|
-
import Icon from '
|
|
5
|
-
import Link from '
|
|
4
|
+
import Icon from '../Icon/Icon';
|
|
5
|
+
import Link from '../Link/Link';
|
|
6
6
|
import './Ribbon.css';
|
|
7
7
|
import Base from '../Base/Base';
|
|
8
8
|
|
|
@@ -38,8 +38,8 @@ const Ribbon: React.FunctionComponent<Props> = (props: Props) => {
|
|
|
38
38
|
{onRemove && (
|
|
39
39
|
<Flex>
|
|
40
40
|
{/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
|
|
41
|
-
<Link
|
|
42
|
-
<Icon name="CloseSmall" />
|
|
41
|
+
<Link clickable onClick={onRemove}>
|
|
42
|
+
<Icon name="CloseSmall" size="1.5rem" />
|
|
43
43
|
</Link>
|
|
44
44
|
</Flex>
|
|
45
45
|
)}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/* stylelint-disable no-descending-specificity */
|
|
2
|
+
|
|
3
|
+
.Sidebar__header,
|
|
4
|
+
.Sidebar__menu {
|
|
5
|
+
border-bottom-width: 0.0625rem;
|
|
6
|
+
border-bottom-style: solid;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.Sidebar__menu:first-child {
|
|
10
|
+
border-top-width: 0.0625rem;
|
|
11
|
+
border-top-style: solid;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.Sidebar__header {
|
|
15
|
+
padding: var(--size--x4) var(--size--x6);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.Sidebar__menu-item {
|
|
19
|
+
position: relative;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
z-index: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.Sidebar__menu-item::before {
|
|
25
|
+
content: '';
|
|
26
|
+
position: absolute;
|
|
27
|
+
top: 0;
|
|
28
|
+
bottom: 0;
|
|
29
|
+
left: 0;
|
|
30
|
+
width: var(--size--x1);
|
|
31
|
+
opacity: 0;
|
|
32
|
+
border-radius: 0 var(--size--x1) var(--size--x1) 0;
|
|
33
|
+
background-color: var(--color-aqua--3);
|
|
34
|
+
transition-property: opacity;
|
|
35
|
+
transition-duration: var(--transition-duration--slow);
|
|
36
|
+
transition-timing-function: var(--transition-timing-function);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.Sidebar__menu-item-link {
|
|
40
|
+
position: relative;
|
|
41
|
+
padding: var(--size--x4) var(--size--x6);
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.Sidebar__menu-item-link::before {
|
|
46
|
+
content: '';
|
|
47
|
+
position: absolute;
|
|
48
|
+
top: 0;
|
|
49
|
+
right: 0;
|
|
50
|
+
bottom: 0;
|
|
51
|
+
left: 0;
|
|
52
|
+
border-radius: var(--size--x2);
|
|
53
|
+
z-index: -1;
|
|
54
|
+
transition-property: transform, border-radius, background-color;
|
|
55
|
+
transition-duration: var(--transition-duration--base);
|
|
56
|
+
transition-timing-function: var(--transition-timing-function);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.Sidebar__menu-item--active::before,
|
|
60
|
+
.Sidebar__menu-item--active:hover::before {
|
|
61
|
+
opacity: 1;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.Sidebar__menu-item--active .Sidebar__menu-item-link::before,
|
|
65
|
+
.Sidebar__menu-item--active:hover .Sidebar__menu-item-link::before {
|
|
66
|
+
transform: scale(1.2);
|
|
67
|
+
border-radius: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.Sidebar__sub-menu-item {
|
|
71
|
+
padding: var(--size--x2) var(--size--x6);
|
|
72
|
+
border-top-width: 0.0625rem;
|
|
73
|
+
border-top-style: solid;
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
transition-property: background-color;
|
|
76
|
+
transition-duration: var(--transition-duration--base);
|
|
77
|
+
transition-timing-function: var(--transition-timing-function);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.Sidebar--theme-dark {
|
|
81
|
+
background-color: var(--color-grape--5);
|
|
82
|
+
color: var(--color-gray--1);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.Sidebar--theme-dark .Sidebar__header,
|
|
86
|
+
.Sidebar--theme-dark .Sidebar__menu {
|
|
87
|
+
border-bottom-color: var(--color-grape--4);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.Sidebar--theme-dark .Sidebar__menu:first-child {
|
|
91
|
+
border-top-color: var(--color-grape--4);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.Sidebar--theme-dark .Sidebar__sub-menu-item {
|
|
95
|
+
border-top-color: var(--color-grape--5);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.Sidebar--theme-light {
|
|
99
|
+
background-color: var(--color-white);
|
|
100
|
+
color: var(--color-grape-5);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.Sidebar--theme-light .Sidebar__header,
|
|
104
|
+
.Sidebar--theme-light .Sidebar__menu {
|
|
105
|
+
border-bottom-color: var(--color-gray--2);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.Sidebar--theme-light .Sidebar__menu:first-child {
|
|
109
|
+
border-top-color: var(--color-gray--2);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.Sidebar--theme-light .Sidebar__sub-menu-item,
|
|
113
|
+
.Sidebar--theme-light .Sidebar__menu-item--active .Sidebar__menu-item-link::before,
|
|
114
|
+
.Sidebar--theme-light .Sidebar__menu-item:hover .Sidebar__menu-item-link::before {
|
|
115
|
+
background-color: var(--color-gray--1);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.Sidebar--theme-light .Sidebar__sub-menu-item {
|
|
119
|
+
border-top-color: var(--color-gray--2);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.Sidebar--theme-light .Sidebar__sub-menu-item--active,
|
|
123
|
+
.Sidebar--theme-light .Sidebar__sub-menu-item:hover {
|
|
124
|
+
background-color: var(--color-gray--2);
|
|
125
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import Flex, { Props as FlexProps } from '../Flex/Flex';
|
|
4
|
+
import './Sidebar.css';
|
|
5
|
+
|
|
6
|
+
export interface Props extends FlexProps {
|
|
7
|
+
theme?: 'dark' | 'light';
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A full sidebar navigation component that can include a combination
|
|
12
|
+
* of top level and sub menus.
|
|
13
|
+
*/
|
|
14
|
+
const Sidebar: React.FunctionComponent<Props> = (props: Props) => {
|
|
15
|
+
const { theme, ...rest } = props;
|
|
16
|
+
const classes = classnames('Sidebar', `Sidebar--theme-${theme}`);
|
|
17
|
+
|
|
18
|
+
return <Flex className={classes} grow {...rest} />;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
Sidebar.defaultProps = {
|
|
22
|
+
theme: 'dark',
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default Sidebar;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import Base, { Props as BaseProps } from '../Base/Base';
|
|
3
|
+
|
|
4
|
+
export type Props = BaseProps;
|
|
5
|
+
|
|
6
|
+
const SidebarHeader: React.FunctionComponent<Props> = (props: Props) => {
|
|
7
|
+
return <Base {...props} className="Sidebar__header" />;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default SidebarHeader;
|