@bitrise/bitkit 10.1.0-alpha-chakra.2 → 10.1.0-alpha-breadcrumb.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/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 +50 -0
- package/src/Components/Breadcrumb/BreadcrumbLink.tsx +33 -0
- package/src/Components/Dialog/Dialog.tsx +4 -0
- 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
package/package.json
CHANGED
|
@@ -1,16 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitrise/bitkit",
|
|
3
3
|
"description": "Bitrise React component library",
|
|
4
|
-
"version": "10.1.0-alpha-
|
|
4
|
+
"version": "10.1.0-alpha-breadcrumb.1",
|
|
5
5
|
"repository": "git@github.com:bitrise-io/bitkit.git",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"license": "UNLICENSED",
|
|
8
8
|
"scripts": {
|
|
9
|
+
"build": "yarn build:lib && yarn build:site",
|
|
10
|
+
"build:docs": "ts-node ./scripts/build-docs",
|
|
9
11
|
"build:icons": "ts-node ./scripts/build-icons.ts",
|
|
12
|
+
"build:lib": "rm -rf ./lib && yarn build:lib:cjs && yarn build:lib:esn",
|
|
13
|
+
"build:lib:esn": "tsc -p src -m esnext -t esnext --outDir lib/esn",
|
|
14
|
+
"build:lib:cjs": "tsc -p src --outDir lib/cjs",
|
|
15
|
+
"build:prepare": "rm -rf ./dist && mkdir dist && cp site/index.html dist && ln -s index.html dist/404.html",
|
|
16
|
+
"build:site": "yarn build:prepare && yarn build:docs && yarn tsc:site && yarn build:site:esbuild",
|
|
17
|
+
"tsc:site": "tsc --noEmit -p site/tsconfig.json",
|
|
18
|
+
"build:site:esbuild": "esbuild --bundle site/index.tsx --outdir=dist --target=esnext --loader:.woff2=file --loader:.woff=file --minify --sourcemap",
|
|
10
19
|
"commitlint": "commitlint",
|
|
11
|
-
"lint": "
|
|
20
|
+
"lint": "yarn lint:js",
|
|
21
|
+
"lint:js": "eslint src/**/*.tsx",
|
|
12
22
|
"semantic-release": "semantic-release",
|
|
13
|
-
"
|
|
23
|
+
"serve": "superstatic ./dist --port 4001 -c superstatic.json",
|
|
24
|
+
"start": "yarn build:prepare && concurrently \"yarn start:docs\" \"yarn start:esbuild\" \"yarn serve\"",
|
|
25
|
+
"start:esbuild": "esbuild --bundle site/index.tsx --watch --outdir=dist --target=esnext --loader:.woff2=file --loader:.woff=file",
|
|
26
|
+
"start:docs": "ts-node ./scripts/build-docs-watch",
|
|
14
27
|
"test": "jest ./src",
|
|
15
28
|
"storybook": "start-storybook -p 6006",
|
|
16
29
|
"build-storybook": "build-storybook"
|
|
@@ -20,14 +33,15 @@
|
|
|
20
33
|
"framer-motion": "./node_modules/framer-motion/dist/cjs"
|
|
21
34
|
},
|
|
22
35
|
"dependencies": {
|
|
23
|
-
"@chakra-ui/react": "^2.2.
|
|
36
|
+
"@chakra-ui/react": "^2.2.1",
|
|
24
37
|
"@emotion/react": "^11.9.3",
|
|
25
38
|
"@emotion/styled": "^11.9.3",
|
|
39
|
+
"@juggle/resize-observer": "^3.3.1",
|
|
26
40
|
"@popperjs/core": "^2.11.5",
|
|
27
41
|
"classnames": "^2.3.1",
|
|
28
42
|
"clipboard": "^2.0.11",
|
|
29
|
-
"framer-motion": "^6.
|
|
30
|
-
"luxon": "^2.
|
|
43
|
+
"framer-motion": "^6.3.15",
|
|
44
|
+
"luxon": "^2.4.0",
|
|
31
45
|
"react": "^18.2.0",
|
|
32
46
|
"react-dom": "^18.2.0",
|
|
33
47
|
"react-popper": "^2.3.0"
|
|
@@ -37,13 +51,13 @@
|
|
|
37
51
|
"react-dom": "^18.2.0"
|
|
38
52
|
},
|
|
39
53
|
"devDependencies": {
|
|
40
|
-
"@babel/core": "^7.18.
|
|
41
|
-
"@babel/parser": "^7.18.
|
|
54
|
+
"@babel/core": "^7.18.5",
|
|
55
|
+
"@babel/parser": "^7.18.5",
|
|
42
56
|
"@bitrise/eslint-plugin": "^2.2.0",
|
|
43
|
-
"@chakra-ui/cli": "^2.1.
|
|
57
|
+
"@chakra-ui/cli": "^2.1.0",
|
|
44
58
|
"@commitlint/cli": "^16.3.0",
|
|
45
59
|
"@commitlint/config-conventional": "^16.2.4",
|
|
46
|
-
"@google-cloud/storage": "^5.
|
|
60
|
+
"@google-cloud/storage": "^5.19.4",
|
|
47
61
|
"@semantic-release/changelog": "^6.0.1",
|
|
48
62
|
"@semantic-release/commit-analyzer": "^9.0.2",
|
|
49
63
|
"@semantic-release/git": "^10.0.1",
|
|
@@ -57,43 +71,63 @@
|
|
|
57
71
|
"@storybook/react": "^6.5.9",
|
|
58
72
|
"@storybook/testing-library": "^0.0.13",
|
|
59
73
|
"@storybook/theming": "^6.5.9",
|
|
60
|
-
"@svgr/
|
|
74
|
+
"@svgr/cli": "^6.2.1",
|
|
75
|
+
"@svgr/core": "^6.2.1",
|
|
61
76
|
"@types/cheerio": "^0.22.31",
|
|
62
77
|
"@types/clipboard": "^2.0.1",
|
|
63
78
|
"@types/enzyme": "^3.10.12",
|
|
64
|
-
"@types/
|
|
65
|
-
"@types/
|
|
66
|
-
"@types/
|
|
67
|
-
"@types/
|
|
79
|
+
"@types/fscreen": "^1.0.1",
|
|
80
|
+
"@types/jest": "^27.5.1",
|
|
81
|
+
"@types/lodash.sample": "^4.2.7",
|
|
82
|
+
"@types/lodash.shuffle": "^4.2.7",
|
|
83
|
+
"@types/luxon": "^2.3.2",
|
|
84
|
+
"@types/prismjs": "^1.26.0",
|
|
85
|
+
"@types/react": "18.0.14",
|
|
86
|
+
"@types/react-dom": "^18.0.5",
|
|
87
|
+
"@types/react-router": "^5.1.18",
|
|
88
|
+
"@types/react-router-dom": "^5.3.3",
|
|
68
89
|
"@types/vfile-message": "^2.0.0",
|
|
69
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
70
|
-
"@typescript-eslint/parser": "^5.
|
|
90
|
+
"@typescript-eslint/eslint-plugin": "^5.29.0",
|
|
91
|
+
"@typescript-eslint/parser": "^5.29.0",
|
|
71
92
|
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.7",
|
|
72
93
|
"axios": "^0.27.2",
|
|
73
94
|
"babel-eslint": "^10.0.1",
|
|
74
95
|
"babel-loader": "^8.2.5",
|
|
75
96
|
"babel-plugin-polyfill-corejs2": "^0.3.1",
|
|
97
|
+
"concurrently": "^7.2.2",
|
|
76
98
|
"enzyme": "^3.11.0",
|
|
77
99
|
"enzyme-to-json": "^3.6.2",
|
|
78
|
-
"
|
|
100
|
+
"esbuild": "^0.14.47",
|
|
101
|
+
"eslint": "^8.18.0",
|
|
79
102
|
"eslint-plugin-import": "^2.26.0",
|
|
80
|
-
"eslint-plugin-jest": "^26.
|
|
103
|
+
"eslint-plugin-jest": "^26.5.3",
|
|
81
104
|
"eslint-plugin-jsx-a11y": "^6.6.0",
|
|
82
|
-
"eslint-plugin-prettier": "^4.
|
|
105
|
+
"eslint-plugin-prettier": "^4.1.0",
|
|
83
106
|
"eslint-plugin-react": "^7.30.1",
|
|
84
107
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
85
|
-
"eslint-plugin-storybook": "^0.
|
|
108
|
+
"eslint-plugin-storybook": "^0.5.13",
|
|
86
109
|
"eslint-plugin-testing-library": "^5.5.1",
|
|
110
|
+
"fscreen": "^1.2.0",
|
|
87
111
|
"glob": "^8.0.3",
|
|
88
112
|
"husky": "^7.0.4",
|
|
89
113
|
"identity-obj-proxy": "^3.0.0",
|
|
90
114
|
"jest": "^27.5.1",
|
|
91
115
|
"jsdom": "^19.0.0",
|
|
116
|
+
"lodash.sample": "^4.2.1",
|
|
117
|
+
"lodash.shuffle": "^4.2.0",
|
|
118
|
+
"node-watch": "^0.7.3",
|
|
92
119
|
"prettier": "^2.7.1",
|
|
120
|
+
"prismjs": "^1.28.0",
|
|
121
|
+
"react": "^18.2.0",
|
|
122
|
+
"react-docgen": "5.4.2",
|
|
123
|
+
"react-dom": "^18.2.0",
|
|
124
|
+
"react-router": "^5.3.1",
|
|
125
|
+
"react-router-dom": "^5.3.1",
|
|
93
126
|
"recast": "^0.21.1",
|
|
94
127
|
"semantic-release": "^19.0.3",
|
|
128
|
+
"superstatic": "^8.0.0",
|
|
95
129
|
"ts-jest": "^27.1.5",
|
|
96
|
-
"ts-node": "^10.
|
|
130
|
+
"ts-node": "^10.8.1",
|
|
97
131
|
"tsconfig-paths-webpack-plugin": "^3.5.2",
|
|
98
132
|
"typescript": "^4.7.4",
|
|
99
133
|
"webpack": "^5.73.0"
|
|
@@ -119,7 +153,7 @@
|
|
|
119
153
|
},
|
|
120
154
|
"resolutions": {
|
|
121
155
|
"**/ast-types": "npm:@gkz/ast-types",
|
|
122
|
-
"ts-node": "^10.
|
|
156
|
+
"ts-node": "^10.8.1",
|
|
123
157
|
"@types/react": "17.0.40"
|
|
124
158
|
}
|
|
125
159
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
2
|
+
import Breadcrumb from './Breadcrumb';
|
|
3
|
+
import BreadcrumbLink from './BreadcrumbLink';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Components/Breadcrumb',
|
|
7
|
+
component: Breadcrumb,
|
|
8
|
+
subcomponents: { BreadcrumbLink },
|
|
9
|
+
} as ComponentMeta<typeof Breadcrumb>;
|
|
10
|
+
|
|
11
|
+
const Template: ComponentStory<typeof Breadcrumb> = (props) => (
|
|
12
|
+
<Breadcrumb {...props}>
|
|
13
|
+
<BreadcrumbLink
|
|
14
|
+
avatarUrl="https://bitrise-public-content-production.s3.amazonaws.com/org-icons/default_avatar-02.png"
|
|
15
|
+
href="#"
|
|
16
|
+
>
|
|
17
|
+
Bitrise #Core
|
|
18
|
+
</BreadcrumbLink>
|
|
19
|
+
<BreadcrumbLink avatarName="Bitkit" href="#">
|
|
20
|
+
bitkit
|
|
21
|
+
</BreadcrumbLink>
|
|
22
|
+
<BreadcrumbLink isCurrentPage>settings</BreadcrumbLink>
|
|
23
|
+
</Breadcrumb>
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
export const WithProps = Template.bind({});
|
|
27
|
+
WithProps.args = {
|
|
28
|
+
hasSeparatorAfterLast: false,
|
|
29
|
+
hasSeparatorBeforeFirst: false,
|
|
30
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { SystemStyleObject } from '@chakra-ui/theme-tools';
|
|
2
|
+
|
|
3
|
+
const BreadcrumbTheme: SystemStyleObject = {
|
|
4
|
+
baseStyle: {
|
|
5
|
+
container: {
|
|
6
|
+
'> ol': {
|
|
7
|
+
display: 'flex',
|
|
8
|
+
alignItems: 'center',
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
link: {
|
|
12
|
+
display: 'flex',
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
gap: '8',
|
|
15
|
+
'[aria-current]': {
|
|
16
|
+
color: 'red',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
separator: {
|
|
20
|
+
display: 'flex',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default BreadcrumbTheme;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Children } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Breadcrumb as ChakraBreadcrumb,
|
|
4
|
+
BreadcrumbProps as ChakraBreadcrumbProps,
|
|
5
|
+
BreadcrumbItem,
|
|
6
|
+
BreadcrumbSeparator,
|
|
7
|
+
forwardRef,
|
|
8
|
+
useBreakpointValue,
|
|
9
|
+
} from '@chakra-ui/react';
|
|
10
|
+
import Icon, { TypeIconName } from '../Icon/Icon';
|
|
11
|
+
|
|
12
|
+
export interface BreadcrumbProps extends ChakraBreadcrumbProps {
|
|
13
|
+
hasSeparatorAfterLast?: boolean;
|
|
14
|
+
hasSeparatorBeforeFirst?: boolean;
|
|
15
|
+
separatorIconName?: TypeIconName;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Breadcrumbs is a navigation pattern that helps users understand the hierarchy of a website.
|
|
20
|
+
*/
|
|
21
|
+
const Breadcrumb = forwardRef<BreadcrumbProps, 'nav'>((props, ref) => {
|
|
22
|
+
const { children, hasSeparatorAfterLast, hasSeparatorBeforeFirst, separatorIconName, ...rest } = props;
|
|
23
|
+
const isMobile = !!useBreakpointValue({ mobile: true, desktop: false }, 'desktop');
|
|
24
|
+
|
|
25
|
+
const childrenCount = Children.count(children);
|
|
26
|
+
const items = Children.map(children, (child, index) => {
|
|
27
|
+
return (
|
|
28
|
+
<BreadcrumbItem>
|
|
29
|
+
{hasSeparatorBeforeFirst && index === 0 && <BreadcrumbSeparator />}
|
|
30
|
+
{child}
|
|
31
|
+
{hasSeparatorAfterLast && index === childrenCount - 1 && <BreadcrumbSeparator />}
|
|
32
|
+
</BreadcrumbItem>
|
|
33
|
+
);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const defaultIconName = isMobile ? 'ChevronLeft' : 'ChevronRight';
|
|
37
|
+
const properties = {
|
|
38
|
+
separator: <Icon name={separatorIconName || defaultIconName} color="neutral.70" size="16" />,
|
|
39
|
+
...rest,
|
|
40
|
+
};
|
|
41
|
+
return (
|
|
42
|
+
<ChakraBreadcrumb {...properties} ref={ref}>
|
|
43
|
+
{items}
|
|
44
|
+
</ChakraBreadcrumb>
|
|
45
|
+
);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
Breadcrumb.defaultProps = {};
|
|
49
|
+
|
|
50
|
+
export default Breadcrumb;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BreadcrumbLink as ChakraBreadcrumbLink,
|
|
3
|
+
BreadcrumbLinkProps as ChakraBreadcrumbLinkProps,
|
|
4
|
+
forwardRef,
|
|
5
|
+
useBreakpointValue,
|
|
6
|
+
} from '@chakra-ui/react';
|
|
7
|
+
import Avatar from '../Avatar/Avatar';
|
|
8
|
+
|
|
9
|
+
export interface BreadcrumbLinkProps extends ChakraBreadcrumbLinkProps {
|
|
10
|
+
avatarName?: string;
|
|
11
|
+
avatarUrl?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const BreadcrumbLink = forwardRef<BreadcrumbLinkProps, 'a'>((props, ref) => {
|
|
15
|
+
const { avatarName, avatarUrl, children, isCurrentPage, ...rest } = props;
|
|
16
|
+
const isMobile = !!useBreakpointValue({ mobile: true, desktop: false }, 'desktop');
|
|
17
|
+
|
|
18
|
+
const properties: ChakraBreadcrumbLinkProps = {
|
|
19
|
+
color: isCurrentPage ? 'neutral.40' : 'inherit',
|
|
20
|
+
isCurrentPage,
|
|
21
|
+
...rest,
|
|
22
|
+
};
|
|
23
|
+
return (
|
|
24
|
+
<ChakraBreadcrumbLink {...properties} color={isCurrentPage ? 'neutral.40' : 'inherit'} ref={ref}>
|
|
25
|
+
{!isMobile && (avatarName || avatarUrl) && (
|
|
26
|
+
<Avatar name={avatarName || children?.toString()} src={avatarUrl} borderRadius="4" />
|
|
27
|
+
)}
|
|
28
|
+
{children}
|
|
29
|
+
</ChakraBreadcrumbLink>
|
|
30
|
+
);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export default BreadcrumbLink;
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
ModalCloseButton,
|
|
6
6
|
ModalHeader,
|
|
7
7
|
useBreakpointValue,
|
|
8
|
+
usePrefersReducedMotion,
|
|
8
9
|
HTMLChakraProps,
|
|
9
10
|
} from '@chakra-ui/react';
|
|
10
11
|
import { BREAKPOINTS } from '../../Foundations/Breakpoints/Breakpoints';
|
|
@@ -35,11 +36,14 @@ const Dialog = ({
|
|
|
35
36
|
...rest
|
|
36
37
|
}: DialogProps) => {
|
|
37
38
|
const dialogSize = useBreakpointValue({ [BREAKPOINTS.MOBILE]: 'mobile', [BREAKPOINTS.DESKTOP]: size });
|
|
39
|
+
const prefersReducedMotion = usePrefersReducedMotion();
|
|
40
|
+
|
|
38
41
|
return (
|
|
39
42
|
<Modal
|
|
40
43
|
closeOnEsc={isClosable}
|
|
41
44
|
closeOnOverlayClick={false}
|
|
42
45
|
isOpen={isOpen}
|
|
46
|
+
motionPreset={prefersReducedMotion ? 'none' : 'scale'}
|
|
43
47
|
onClose={isClosable ? onClose : () => {}}
|
|
44
48
|
scrollBehavior={scrollBehavior}
|
|
45
49
|
size={dialogSize}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
+
Badge as ChakraBadge,
|
|
3
|
+
BadgeProps as ChakraBadgeProps,
|
|
2
4
|
Button,
|
|
3
5
|
Tab as ChakraTab,
|
|
4
6
|
TabProps as ChakraTabProps,
|
|
@@ -6,8 +8,28 @@ import {
|
|
|
6
8
|
useMultiStyleConfig,
|
|
7
9
|
useTab,
|
|
8
10
|
} from '@chakra-ui/react';
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
+
import Icon from '../../Old/Icon/Icon';
|
|
12
|
+
import { TypeIconName } from '../../Old/Icon/tsx';
|
|
13
|
+
|
|
14
|
+
// TODO: separated component
|
|
15
|
+
interface BadgeProps extends ChakraBadgeProps {
|
|
16
|
+
backgroundColor?: ChakraBadgeProps['backgroundColor'];
|
|
17
|
+
children?: number | string;
|
|
18
|
+
color?: ChakraBadgeProps['color'];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const Badge = (props: BadgeProps) => {
|
|
22
|
+
const properties: ChakraBadgeProps = {
|
|
23
|
+
...props,
|
|
24
|
+
borderRadius: '4',
|
|
25
|
+
fontSize: '1',
|
|
26
|
+
lineHeight: '1',
|
|
27
|
+
paddingY: '3px',
|
|
28
|
+
paddingX: '8',
|
|
29
|
+
textTransform: 'uppercase',
|
|
30
|
+
};
|
|
31
|
+
return <ChakraBadge {...properties} />;
|
|
32
|
+
};
|
|
11
33
|
|
|
12
34
|
export interface TabProps extends ChakraTabProps {
|
|
13
35
|
badge?: BadgeProps;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
2
|
+
import { useDisclosure } from '@chakra-ui/react';
|
|
3
|
+
import Button from '../Button/Button';
|
|
4
|
+
import Box from '../Box/Box';
|
|
5
|
+
import Fade from './Fade';
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: 'Components/Fade',
|
|
9
|
+
component: Fade,
|
|
10
|
+
} as ComponentMeta<typeof Fade>;
|
|
11
|
+
|
|
12
|
+
export const WithProps: ComponentStory<typeof Fade> = (props) => {
|
|
13
|
+
const { isOpen, onToggle } = useDisclosure();
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<Box height="200">
|
|
17
|
+
<Button onClick={onToggle}>Toggle fade transition</Button>
|
|
18
|
+
|
|
19
|
+
<Fade in={isOpen} {...props}>
|
|
20
|
+
<Box p="32" color="neutral.10" mt="4" bg="neutral.90">
|
|
21
|
+
Fade
|
|
22
|
+
</Box>
|
|
23
|
+
</Fade>
|
|
24
|
+
</Box>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Fade as ChakraFade, FadeProps, forwardRef } from '@chakra-ui/react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Fade is a transition component
|
|
5
|
+
*/
|
|
6
|
+
const Fade = forwardRef<FadeProps, 'div'>((props, ref) => {
|
|
7
|
+
return <ChakraFade {...props} ref={ref} />;
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export type { FadeProps };
|
|
11
|
+
|
|
12
|
+
export default Fade;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--AddonBeam--height: 3rem;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.AddonBeam {
|
|
6
|
+
min-height: var(--AddonBeam--height);
|
|
7
|
+
padding: 0.375rem 1.25rem;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.AddonBeam__link {
|
|
11
|
+
padding: 0.375rem var(--size--x2);
|
|
12
|
+
border-radius: var(--size--x2);
|
|
13
|
+
transition-property: background-color;
|
|
14
|
+
transition-duration: var(--transition-duration--base);
|
|
15
|
+
transition-timing-function: var(--transition-timing-function);
|
|
16
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TypeIconName } from '../Icon/tsx';
|
|
3
|
+
import Flex, { Props as FlexProps } from '../Flex/Flex';
|
|
4
|
+
import Hamburger from '../Hamburger/Hamburger';
|
|
5
|
+
import Icon from '../Icon/Icon';
|
|
6
|
+
import Link from '../Link/Link';
|
|
7
|
+
import Image from '../Image/Image';
|
|
8
|
+
import Text from '../Text/Text';
|
|
9
|
+
import AddonBeamLink from './AddonBeamLink';
|
|
10
|
+
import './AddonBeam.css';
|
|
11
|
+
|
|
12
|
+
export interface Props extends FlexProps {
|
|
13
|
+
/** The icon that appears to the very left of the beam that represents the add-on */
|
|
14
|
+
addonIcon: TypeIconName;
|
|
15
|
+
/** The name that appears next to the add-on icon */
|
|
16
|
+
addonName: string;
|
|
17
|
+
/** Image src for the Bitrise application */
|
|
18
|
+
appImage?: string;
|
|
19
|
+
/** Link back to the Bitrise application */
|
|
20
|
+
appLink?: string;
|
|
21
|
+
/** Name for the Bitrise application */
|
|
22
|
+
appName?: string;
|
|
23
|
+
/** Flag that indicates with a badge that the addon is in a Beta stage */
|
|
24
|
+
isBeta?: boolean;
|
|
25
|
+
/** Flag for if the Hamburger menu icon should be in an active state */
|
|
26
|
+
isHamburgerIconActive?: boolean;
|
|
27
|
+
/** */
|
|
28
|
+
isInResponsiveView?: boolean;
|
|
29
|
+
/** Event handler for when the Hamburger menu item is clicked */
|
|
30
|
+
onHamburgerIconClick?: (event: React.SyntheticEvent) => void;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** The common internal Add-on Beam for Bitrise made add-ons */
|
|
34
|
+
const AddonBeam: React.FunctionComponent<Props> = (props: Props) => {
|
|
35
|
+
const {
|
|
36
|
+
addonIcon,
|
|
37
|
+
addonName,
|
|
38
|
+
appImage,
|
|
39
|
+
appLink,
|
|
40
|
+
appName,
|
|
41
|
+
children,
|
|
42
|
+
isBeta,
|
|
43
|
+
isHamburgerIconActive,
|
|
44
|
+
isInResponsiveView,
|
|
45
|
+
onHamburgerIconClick,
|
|
46
|
+
...rest
|
|
47
|
+
} = props;
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<Flex
|
|
51
|
+
{...rest}
|
|
52
|
+
alignChildrenHorizontal="between"
|
|
53
|
+
alignChildrenVertical="middle"
|
|
54
|
+
className="AddonBeam"
|
|
55
|
+
container
|
|
56
|
+
direction="horizontal"
|
|
57
|
+
>
|
|
58
|
+
{isInResponsiveView && !!onHamburgerIconClick && (
|
|
59
|
+
<Flex>
|
|
60
|
+
{/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
|
|
61
|
+
<Link color="neutral.100" onClick={onHamburgerIconClick}>
|
|
62
|
+
<Hamburger active={isHamburgerIconActive} />
|
|
63
|
+
</Link>
|
|
64
|
+
</Flex>
|
|
65
|
+
)}
|
|
66
|
+
|
|
67
|
+
<Flex
|
|
68
|
+
absolute={isInResponsiveView ? 'center' : undefined}
|
|
69
|
+
alignChildrenVertical="middle"
|
|
70
|
+
direction="horizontal"
|
|
71
|
+
gap="x2"
|
|
72
|
+
>
|
|
73
|
+
<Flex>
|
|
74
|
+
<Icon name={addonIcon} />
|
|
75
|
+
</Flex>
|
|
76
|
+
|
|
77
|
+
<Flex>
|
|
78
|
+
<Text size="3">
|
|
79
|
+
<Text inline weight="bold">
|
|
80
|
+
{addonName}
|
|
81
|
+
</Text>{' '}
|
|
82
|
+
by Bitrise
|
|
83
|
+
</Text>
|
|
84
|
+
</Flex>
|
|
85
|
+
</Flex>
|
|
86
|
+
|
|
87
|
+
{!isInResponsiveView && appName && (
|
|
88
|
+
<Flex absolute="center">
|
|
89
|
+
<AddonBeamLink href={appLink}>
|
|
90
|
+
<Flex alignChildrenVertical="middle" direction="horizontal" gap="x2">
|
|
91
|
+
{appImage && (
|
|
92
|
+
<Flex>
|
|
93
|
+
<Image borderRadius="x1" height="1.5rem" src={appImage} width="1.5rem" />
|
|
94
|
+
</Flex>
|
|
95
|
+
)}
|
|
96
|
+
|
|
97
|
+
<Flex alignChildrenVertical="middle" direction="horizontal" gap="x1">
|
|
98
|
+
<Flex>{appName}</Flex>
|
|
99
|
+
<Flex>
|
|
100
|
+
<Icon name="OpenInBrowser" />
|
|
101
|
+
</Flex>
|
|
102
|
+
</Flex>
|
|
103
|
+
</Flex>
|
|
104
|
+
</AddonBeamLink>
|
|
105
|
+
</Flex>
|
|
106
|
+
)}
|
|
107
|
+
|
|
108
|
+
{children && !isInResponsiveView && (
|
|
109
|
+
<Flex alignChildrenVertical="middle" direction="horizontal" gap="x6">
|
|
110
|
+
{children}
|
|
111
|
+
</Flex>
|
|
112
|
+
)}
|
|
113
|
+
</Flex>
|
|
114
|
+
);
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
export default AddonBeam;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TypeIconName } from '../Icon/tsx';
|
|
3
|
+
import Flex, { Props as FlexProps } from '../Flex/Flex';
|
|
4
|
+
import Icon from '../Icon/Icon';
|
|
5
|
+
|
|
6
|
+
export interface Props extends FlexProps {
|
|
7
|
+
Component?: FlexProps['Component'];
|
|
8
|
+
/** Name of the icon that appears next to the text of the link. */
|
|
9
|
+
icon?: TypeIconName;
|
|
10
|
+
/** @Ignore */
|
|
11
|
+
to?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Link that appears to the very right of the beam.
|
|
16
|
+
*/
|
|
17
|
+
const AddonBeamLink: React.FunctionComponent<Props> = (props: Props) => {
|
|
18
|
+
const { children, icon, ...rest } = props;
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<Flex {...rest} className="AddonBeam__link" direction="horizontal" gap="x1">
|
|
22
|
+
{icon && (
|
|
23
|
+
<Flex>
|
|
24
|
+
<Icon name={icon} />
|
|
25
|
+
</Flex>
|
|
26
|
+
)}
|
|
27
|
+
|
|
28
|
+
<Flex>{children}</Flex>
|
|
29
|
+
</Flex>
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
AddonBeamLink.defaultProps = {
|
|
34
|
+
Component: 'a',
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export default AddonBeamLink;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import Flex, { Props as FlexProps } from '../Flex/Flex';
|
|
3
|
+
import Icon from '../Icon/Icon';
|
|
4
|
+
import Text from '../Text/Text';
|
|
5
|
+
|
|
6
|
+
export interface Props extends FlexProps {
|
|
7
|
+
/** Name of the add-on. */
|
|
8
|
+
addonName: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** A common Bitrise footer component */
|
|
12
|
+
const AddonFooter: React.FunctionComponent<Props> = ({ addonName, ...rest }: Props) => (
|
|
13
|
+
<Flex {...rest} alignChildren="middle" direction="vertical">
|
|
14
|
+
<Icon margin="x2" name="Bitbot" size="1.5rem" />
|
|
15
|
+
<Text align="middle" letterSpacing="x5" size="1" uppercase>
|
|
16
|
+
{addonName}
|
|
17
|
+
</Text>
|
|
18
|
+
<Text align="middle" letterSpacing="x5" size="1" uppercase>
|
|
19
|
+
An Official Bitrise Add-on
|
|
20
|
+
</Text>
|
|
21
|
+
</Flex>
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
export default AddonFooter;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
.AppLayout__header,
|
|
2
|
+
.AppLayout__sidebar {
|
|
3
|
+
position: sticky;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.AppLayout__header {
|
|
7
|
+
top: 0;
|
|
8
|
+
z-index: var(--z-index-Header);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.AppLayout__sidebar {
|
|
12
|
+
top: var(--AddonBeam--height);
|
|
13
|
+
width: 18.75rem;
|
|
14
|
+
height: calc(100vh - var(--AddonBeam--height));
|
|
15
|
+
background-color: var(--color-grape--5);
|
|
16
|
+
overflow: auto;
|
|
17
|
+
z-index: var(--z-index-Sidebar);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.AppLayout--responsive-view {
|
|
21
|
+
&.App--sidebar-visible {
|
|
22
|
+
max-height: 100vh;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
& .AppLayout__sidebar {
|
|
27
|
+
display: flex;
|
|
28
|
+
width: 100%;
|
|
29
|
+
margin-left: -100%;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* "justify-contnet: flex-end" breaks the vertical scroll
|
|
33
|
+
*
|
|
34
|
+
* https://bugs.chromium.org/p/chromium/issues/detail?id=411624
|
|
35
|
+
* https://github.com/philipwalton/flexbugs/issues/53
|
|
36
|
+
*/
|
|
37
|
+
& > :first-child {
|
|
38
|
+
margin-top: auto;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&.AppLayout--sidebar-visible .AppLayout__sidebar {
|
|
43
|
+
transform: translateX(100%);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import Flex, { Props as FlexProps } from '../Flex/Flex';
|
|
4
|
+
import './AppLayout.css';
|
|
5
|
+
|
|
6
|
+
export interface Props extends FlexProps {
|
|
7
|
+
isInResponsiveView?: boolean;
|
|
8
|
+
isSidebarVisible?: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const AppLayout: React.FunctionComponent<Props> = (props: Props) => {
|
|
12
|
+
const { isInResponsiveView, isSidebarVisible, ...rest } = props;
|
|
13
|
+
const classes = classnames('AppLayout', {
|
|
14
|
+
'AppLayout--responsive-view': isInResponsiveView,
|
|
15
|
+
'AppLayout--sidebar-visible': isSidebarVisible,
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
return <Flex {...rest} className={classes} direction="vertical" grow />;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default AppLayout;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import Flex, { Props as FlexProps } from '../Flex/Flex';
|
|
3
|
+
|
|
4
|
+
export type Props = FlexProps;
|
|
5
|
+
|
|
6
|
+
const AppLayoutBody: React.FunctionComponent<Props> = (props: Props) => {
|
|
7
|
+
return <Flex {...props} direction="horizontal" grow />;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default AppLayoutBody;
|