@bitrise/bitkit 10.2.0 → 10.2.3-alpha-chakra.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.
Files changed (253) hide show
  1. package/package.json +23 -57
  2. package/src/Components/Tabs/Tab.tsx +2 -24
  3. package/src/Old/DatePicker/DatePicker.tsx +6 -6
  4. package/src/Old/DatePicker/DatePickerMonth.tsx +7 -7
  5. package/src/Old/Dropdown/Dropdown.tsx +54 -50
  6. package/src/Old/Dropdown/DropdownMenuItem.tsx +1 -2
  7. package/src/Old/Dropdown/DropdownMenuItemGroup.tsx +2 -2
  8. package/src/Old/Input/InputLabel.tsx +5 -3
  9. package/src/Old/Notification/Notification.tsx +3 -4
  10. package/src/Old/Notification/__snapshots__/Notification.test.tsx.snap +8 -12
  11. package/src/Old/Ribbon/Ribbon.tsx +4 -4
  12. package/src/Old/Status/Status500.tsx +6 -6
  13. package/src/Old/Table/TableHeaderCell.tsx +1 -1
  14. package/src/Old/Text/TextSizes.css +0 -39
  15. package/src/Old/Toggle/Toggle.tsx +1 -1
  16. package/src/Old/hooks/index.ts +0 -1
  17. package/src/Old/variables.css +0 -1
  18. package/src/Old/variables.ts +0 -3
  19. package/src/index.ts +0 -3
  20. package/src/old.ts +0 -94
  21. package/src/tsconfig.tsbuildinfo +1 -1
  22. package/src/Components/Transitions/Fade.stories.tsx +0 -26
  23. package/src/Components/Transitions/Fade.tsx +0 -12
  24. package/src/Old/AddonBeam/AddonBeam.css +0 -16
  25. package/src/Old/AddonBeam/AddonBeam.tsx +0 -116
  26. package/src/Old/AddonBeam/AddonBeamLink.tsx +0 -37
  27. package/src/Old/AddonFooter/AddonFooter.tsx +0 -24
  28. package/src/Old/AppLayout/AppLayout.css +0 -45
  29. package/src/Old/AppLayout/AppLayout.tsx +0 -21
  30. package/src/Old/AppLayout/AppLayoutBody.tsx +0 -10
  31. package/src/Old/AppLayout/AppLayoutHeader.tsx +0 -10
  32. package/src/Old/AppLayout/AppLayoutMain.tsx +0 -10
  33. package/src/Old/AppLayout/AppLayoutSidebar.tsx +0 -10
  34. package/src/Old/Avatar/Avatar.css +0 -4
  35. package/src/Old/Avatar/Avatar.tsx +0 -64
  36. package/src/Old/Avatar/avatarColors.ts +0 -26
  37. package/src/Old/Bounds/Bounds.tsx +0 -20
  38. package/src/Old/Button/Button.css +0 -249
  39. package/src/Old/Button/Button.test.tsx +0 -29
  40. package/src/Old/Button/Button.tsx +0 -55
  41. package/src/Old/Button/ButtonSize.ts +0 -3
  42. package/src/Old/Button/Buttons.test.tsx +0 -42
  43. package/src/Old/Button/Buttons.tsx +0 -34
  44. package/src/Old/Button/__snapshots__/Button.test.tsx.snap +0 -73
  45. package/src/Old/Button/__snapshots__/Buttons.test.tsx.snap +0 -45
  46. package/src/Old/Dropdown/DropdownButton.tsx +0 -28
  47. package/src/Old/Dropdown/DropdownMenus.tsx +0 -14
  48. package/src/Old/ExternalLink/ExternalLink.tsx +0 -24
  49. package/src/Old/Icon/Icon.css +0 -4
  50. package/src/Old/Icon/Icon.tsx +0 -32
  51. package/src/Old/Icon/tsx/IconsAddOns.tsx +0 -14
  52. package/src/Old/Icon/tsx/IconsAddOnsColorTuorqouise.tsx +0 -20
  53. package/src/Old/Icon/tsx/IconsAddOnsColorViolet.tsx +0 -20
  54. package/src/Old/Icon/tsx/IconsAddOnsWhite.tsx +0 -20
  55. package/src/Old/Icon/tsx/IconsApp.tsx +0 -16
  56. package/src/Old/Icon/tsx/IconsArrowBack.tsx +0 -14
  57. package/src/Old/Icon/tsx/IconsArrowDown.tsx +0 -21
  58. package/src/Old/Icon/tsx/IconsArrowForward.tsx +0 -16
  59. package/src/Old/Icon/tsx/IconsArrowQuit.tsx +0 -14
  60. package/src/Old/Icon/tsx/IconsArrowUp.tsx +0 -14
  61. package/src/Old/Icon/tsx/IconsBackArrow.tsx +0 -13
  62. package/src/Old/Icon/tsx/IconsBell.tsx +0 -16
  63. package/src/Old/Icon/tsx/IconsBitbot.tsx +0 -16
  64. package/src/Old/Icon/tsx/IconsBitbotFailed.tsx +0 -18
  65. package/src/Old/Icon/tsx/IconsBitbucket.tsx +0 -26
  66. package/src/Old/Icon/tsx/IconsBitbucketFill.tsx +0 -14
  67. package/src/Old/Icon/tsx/IconsBitriseCertified.tsx +0 -19
  68. package/src/Old/Icon/tsx/IconsBook.tsx +0 -16
  69. package/src/Old/Icon/tsx/IconsBranchBranch.tsx +0 -16
  70. package/src/Old/Icon/tsx/IconsBranchCommit.tsx +0 -14
  71. package/src/Old/Icon/tsx/IconsBranchPull.tsx +0 -16
  72. package/src/Old/Icon/tsx/IconsBranchPush.tsx +0 -21
  73. package/src/Old/Icon/tsx/IconsBranchTag.tsx +0 -16
  74. package/src/Old/Icon/tsx/IconsBug.tsx +0 -16
  75. package/src/Old/Icon/tsx/IconsBuild.tsx +0 -14
  76. package/src/Old/Icon/tsx/IconsBuildstatusAborted.tsx +0 -16
  77. package/src/Old/Icon/tsx/IconsBuildstatusAbortedSolid.tsx +0 -15
  78. package/src/Old/Icon/tsx/IconsBuildstatusFailed.tsx +0 -16
  79. package/src/Old/Icon/tsx/IconsBuildstatusFailedSolid.tsx +0 -15
  80. package/src/Old/Icon/tsx/IconsBuildstatusLoading.tsx +0 -13
  81. package/src/Old/Icon/tsx/IconsBuildstatusLoadingAnimated.tsx +0 -31
  82. package/src/Old/Icon/tsx/IconsBuildstatusLoadingeeehh.tsx +0 -13
  83. package/src/Old/Icon/tsx/IconsBuildstatusLoadingeeehhWhite.tsx +0 -13
  84. package/src/Old/Icon/tsx/IconsBuildstatusNeverbuilt.tsx +0 -14
  85. package/src/Old/Icon/tsx/IconsBuildstatusSuccessful.tsx +0 -16
  86. package/src/Old/Icon/tsx/IconsBuildstatusSuccessfulSolid.tsx +0 -15
  87. package/src/Old/Icon/tsx/IconsCalendar.tsx +0 -16
  88. package/src/Old/Icon/tsx/IconsChain.tsx +0 -16
  89. package/src/Old/Icon/tsx/IconsChangePlan.tsx +0 -14
  90. package/src/Old/Icon/tsx/IconsChat.tsx +0 -14
  91. package/src/Old/Icon/tsx/IconsChatMessage.tsx +0 -16
  92. package/src/Old/Icon/tsx/IconsChevronDown.tsx +0 -13
  93. package/src/Old/Icon/tsx/IconsChevronLeft.tsx +0 -16
  94. package/src/Old/Icon/tsx/IconsChevronRight.tsx +0 -16
  95. package/src/Old/Icon/tsx/IconsChevronUp.tsx +0 -15
  96. package/src/Old/Icon/tsx/IconsClock.tsx +0 -16
  97. package/src/Old/Icon/tsx/IconsCloseSmall.tsx +0 -16
  98. package/src/Old/Icon/tsx/IconsCode.tsx +0 -16
  99. package/src/Old/Icon/tsx/IconsCoffee.tsx +0 -16
  100. package/src/Old/Icon/tsx/IconsConsole.tsx +0 -16
  101. package/src/Old/Icon/tsx/IconsCredit.tsx +0 -21
  102. package/src/Old/Icon/tsx/IconsCreditcard.tsx +0 -16
  103. package/src/Old/Icon/tsx/IconsDeleteNope.tsx +0 -15
  104. package/src/Old/Icon/tsx/IconsDeployment.tsx +0 -14
  105. package/src/Old/Icon/tsx/IconsDoc.tsx +0 -16
  106. package/src/Old/Icon/tsx/IconsDollars.tsx +0 -16
  107. package/src/Old/Icon/tsx/IconsDownload.tsx +0 -16
  108. package/src/Old/Icon/tsx/IconsDropdownArrows.tsx +0 -16
  109. package/src/Old/Icon/tsx/IconsDudes.tsx +0 -14
  110. package/src/Old/Icon/tsx/IconsDuplicate.tsx +0 -14
  111. package/src/Old/Icon/tsx/IconsEnterprise.tsx +0 -19
  112. package/src/Old/Icon/tsx/IconsErrorGeneral.tsx +0 -16
  113. package/src/Old/Icon/tsx/IconsFileDoc.tsx +0 -16
  114. package/src/Old/Icon/tsx/IconsFilePdf.tsx +0 -16
  115. package/src/Old/Icon/tsx/IconsFilePlist.tsx +0 -16
  116. package/src/Old/Icon/tsx/IconsFileZip.tsx +0 -16
  117. package/src/Old/Icon/tsx/IconsFilter.tsx +0 -16
  118. package/src/Old/Icon/tsx/IconsFlag.tsx +0 -13
  119. package/src/Old/Icon/tsx/IconsFolder.tsx +0 -16
  120. package/src/Old/Icon/tsx/IconsFullscreen.tsx +0 -14
  121. package/src/Old/Icon/tsx/IconsFullscreenExit.tsx +0 -14
  122. package/src/Old/Icon/tsx/IconsGauge.tsx +0 -16
  123. package/src/Old/Icon/tsx/IconsGithub.tsx +0 -14
  124. package/src/Old/Icon/tsx/IconsGitlab.tsx +0 -20
  125. package/src/Old/Icon/tsx/IconsGitlabFill.tsx +0 -14
  126. package/src/Old/Icon/tsx/IconsGlobe.tsx +0 -16
  127. package/src/Old/Icon/tsx/IconsGroup.tsx +0 -14
  128. package/src/Old/Icon/tsx/IconsHeart.tsx +0 -14
  129. package/src/Old/Icon/tsx/IconsHidePassword.tsx +0 -19
  130. package/src/Old/Icon/tsx/IconsHistory.tsx +0 -14
  131. package/src/Old/Icon/tsx/IconsImage.tsx +0 -14
  132. package/src/Old/Icon/tsx/IconsInfo.tsx +0 -14
  133. package/src/Old/Icon/tsx/IconsIntegrations.tsx +0 -14
  134. package/src/Old/Icon/tsx/IconsInteraction.tsx +0 -14
  135. package/src/Old/Icon/tsx/IconsInvoice.tsx +0 -16
  136. package/src/Old/Icon/tsx/IconsJapanese.tsx +0 -15
  137. package/src/Old/Icon/tsx/IconsKey.tsx +0 -14
  138. package/src/Old/Icon/tsx/IconsLaptop.tsx +0 -13
  139. package/src/Old/Icon/tsx/IconsLaptops.tsx +0 -16
  140. package/src/Old/Icon/tsx/IconsLightbulb.tsx +0 -16
  141. package/src/Old/Icon/tsx/IconsLock.tsx +0 -16
  142. package/src/Old/Icon/tsx/IconsLogin.tsx +0 -16
  143. package/src/Old/Icon/tsx/IconsLogout.tsx +0 -16
  144. package/src/Old/Icon/tsx/IconsMagnifier.tsx +0 -16
  145. package/src/Old/Icon/tsx/IconsMail.tsx +0 -16
  146. package/src/Old/Icon/tsx/IconsMenuGrid.tsx +0 -16
  147. package/src/Old/Icon/tsx/IconsMenuHamburger.tsx +0 -13
  148. package/src/Old/Icon/tsx/IconsMessage.tsx +0 -16
  149. package/src/Old/Icon/tsx/IconsMinusClose.tsx +0 -10
  150. package/src/Old/Icon/tsx/IconsMinusRemove.tsx +0 -16
  151. package/src/Old/Icon/tsx/IconsMobile.tsx +0 -16
  152. package/src/Old/Icon/tsx/IconsMonitoring.tsx +0 -14
  153. package/src/Old/Icon/tsx/IconsMoreHorizontal.tsx +0 -13
  154. package/src/Old/Icon/tsx/IconsMoreVertical.tsx +0 -17
  155. package/src/Old/Icon/tsx/IconsNoTie.tsx +0 -14
  156. package/src/Old/Icon/tsx/IconsNumero.tsx +0 -16
  157. package/src/Old/Icon/tsx/IconsOpenInBrowser.tsx +0 -16
  158. package/src/Old/Icon/tsx/IconsOverview.tsx +0 -14
  159. package/src/Old/Icon/tsx/IconsOwner.tsx +0 -19
  160. package/src/Old/Icon/tsx/IconsPause.tsx +0 -14
  161. package/src/Old/Icon/tsx/IconsPencil.tsx +0 -17
  162. package/src/Old/Icon/tsx/IconsPercent.tsx +0 -14
  163. package/src/Old/Icon/tsx/IconsPerson.tsx +0 -14
  164. package/src/Old/Icon/tsx/IconsPlatformsAndroid.tsx +0 -16
  165. package/src/Old/Icon/tsx/IconsPlatformsApple.tsx +0 -16
  166. package/src/Old/Icon/tsx/IconsPlatformsCordova.tsx +0 -14
  167. package/src/Old/Icon/tsx/IconsPlatformsFastlane.tsx +0 -14
  168. package/src/Old/Icon/tsx/IconsPlatformsFlutter.tsx +0 -14
  169. package/src/Old/Icon/tsx/IconsPlatformsGo.tsx +0 -13
  170. package/src/Old/Icon/tsx/IconsPlatformsIonic.tsx +0 -14
  171. package/src/Old/Icon/tsx/IconsPlatformsMacos.tsx +0 -14
  172. package/src/Old/Icon/tsx/IconsPlatformsNodejs.tsx +0 -13
  173. package/src/Old/Icon/tsx/IconsPlatformsOther.tsx +0 -21
  174. package/src/Old/Icon/tsx/IconsPlatformsReact.tsx +0 -14
  175. package/src/Old/Icon/tsx/IconsPlatformsXamarin.tsx +0 -14
  176. package/src/Old/Icon/tsx/IconsPlay.tsx +0 -16
  177. package/src/Old/Icon/tsx/IconsPlusAdd.tsx +0 -16
  178. package/src/Old/Icon/tsx/IconsPlusOpen.tsx +0 -13
  179. package/src/Old/Icon/tsx/IconsPower.tsx +0 -11
  180. package/src/Old/Icon/tsx/IconsRefresh.tsx +0 -13
  181. package/src/Old/Icon/tsx/IconsRequest.tsx +0 -14
  182. package/src/Old/Icon/tsx/IconsResponsiveness.tsx +0 -14
  183. package/src/Old/Icon/tsx/IconsSave.tsx +0 -14
  184. package/src/Old/Icon/tsx/IconsSecurityShield.tsx +0 -16
  185. package/src/Old/Icon/tsx/IconsSettings.tsx +0 -16
  186. package/src/Old/Icon/tsx/IconsShip.tsx +0 -14
  187. package/src/Old/Icon/tsx/IconsShowPassword.tsx +0 -16
  188. package/src/Old/Icon/tsx/IconsShuffle.tsx +0 -16
  189. package/src/Old/Icon/tsx/IconsStability.tsx +0 -16
  190. package/src/Old/Icon/tsx/IconsStack.tsx +0 -16
  191. package/src/Old/Icon/tsx/IconsStatus.tsx +0 -16
  192. package/src/Old/Icon/tsx/IconsStepThirdParty.tsx +0 -16
  193. package/src/Old/Icon/tsx/IconsStepUpgrade.tsx +0 -10
  194. package/src/Old/Icon/tsx/IconsStepUpgradeCircle.tsx +0 -11
  195. package/src/Old/Icon/tsx/IconsStepVersionOk.tsx +0 -11
  196. package/src/Old/Icon/tsx/IconsSteps.tsx +0 -14
  197. package/src/Old/Icon/tsx/IconsStepsColorTuorqouise.tsx +0 -14
  198. package/src/Old/Icon/tsx/IconsStepsColorViolet.tsx +0 -14
  199. package/src/Old/Icon/tsx/IconsStepsWhite.tsx +0 -14
  200. package/src/Old/Icon/tsx/IconsStopwatch.tsx +0 -16
  201. package/src/Old/Icon/tsx/IconsSupport.tsx +0 -16
  202. package/src/Old/Icon/tsx/IconsSwitch.tsx +0 -13
  203. package/src/Old/Icon/tsx/IconsTestFailed.tsx +0 -14
  204. package/src/Old/Icon/tsx/IconsTestInconclusive.tsx +0 -14
  205. package/src/Old/Icon/tsx/IconsTestInfo.tsx +0 -14
  206. package/src/Old/Icon/tsx/IconsTestSkipped.tsx +0 -14
  207. package/src/Old/Icon/tsx/IconsTestSuccess.tsx +0 -14
  208. package/src/Old/Icon/tsx/IconsTestWarning.tsx +0 -14
  209. package/src/Old/Icon/tsx/IconsTick.tsx +0 -13
  210. package/src/Old/Icon/tsx/IconsTime.tsx +0 -16
  211. package/src/Old/Icon/tsx/IconsTrace.tsx +0 -14
  212. package/src/Old/Icon/tsx/IconsTrash.tsx +0 -16
  213. package/src/Old/Icon/tsx/IconsTrigger.tsx +0 -16
  214. package/src/Old/Icon/tsx/IconsTwitter.tsx +0 -16
  215. package/src/Old/Icon/tsx/IconsValidateShield.tsx +0 -16
  216. package/src/Old/Icon/tsx/IconsWarning.tsx +0 -16
  217. package/src/Old/Icon/tsx/IconsWebUi.tsx +0 -17
  218. package/src/Old/Icon/tsx/IconsWindow.tsx +0 -16
  219. package/src/Old/Icon/tsx/IconsWorkflow.tsx +0 -16
  220. package/src/Old/Icon/tsx/IconsWorkflowFlow.tsx +0 -16
  221. package/src/Old/Icon/tsx/IconsWow.tsx +0 -16
  222. package/src/Old/Icon/tsx/index.ts +0 -694
  223. package/src/Old/Image/Image.css +0 -4
  224. package/src/Old/Image/Image.tsx +0 -15
  225. package/src/Old/Link/Link.css +0 -44
  226. package/src/Old/Link/Link.tsx +0 -30
  227. package/src/Old/List/List.css +0 -3
  228. package/src/Old/List/List.tsx +0 -14
  229. package/src/Old/List/ListItem.tsx +0 -13
  230. package/src/Old/Modal/Modal.css +0 -67
  231. package/src/Old/Modal/Modal.tsx +0 -117
  232. package/src/Old/Modal/ModalBody.tsx +0 -17
  233. package/src/Old/Modal/ModalHeader.tsx +0 -50
  234. package/src/Old/Modal/ModalHeaderProgress.tsx +0 -23
  235. package/src/Old/Modal/ModalTitle.tsx +0 -13
  236. package/src/Old/Portal/Portal.tsx +0 -15
  237. package/src/Old/Progress/ProgressButtonContent.tsx +0 -35
  238. package/src/Old/RadioButton/RadioButton.css +0 -46
  239. package/src/Old/RadioButton/RadioButton.tsx +0 -27
  240. package/src/Old/Sidebar/Sidebar.css +0 -125
  241. package/src/Old/Sidebar/Sidebar.tsx +0 -25
  242. package/src/Old/Sidebar/SidebarHeader.tsx +0 -10
  243. package/src/Old/Sidebar/SidebarMenu.tsx +0 -30
  244. package/src/Old/Sidebar/SidebarMenuContext.ts +0 -7
  245. package/src/Old/Sidebar/SidebarMenuItem.tsx +0 -67
  246. package/src/Old/Sidebar/SidebarSubMenu.tsx +0 -33
  247. package/src/Old/Sidebar/SidebarSubMenuItem.tsx +0 -59
  248. package/src/Old/Status/Status404.tsx +0 -43
  249. package/src/Old/Tabs/Tab.tsx +0 -23
  250. package/src/Old/Tabs/Tabs.css +0 -30
  251. package/src/Old/Tabs/Tabs.tsx +0 -18
  252. package/src/Old/Tooltip/Tooltip.tsx +0 -85
  253. package/src/Old/hooks/useResizeObserver.ts +0 -40
@@ -1,30 +0,0 @@
1
- import * as React from 'react';
2
- import Base, { Props as BaseProps } from '../Base/Base';
3
- import { SidebarMenuContext } from './SidebarMenuContext';
4
-
5
- const { useState } = React;
6
-
7
- export interface Props extends BaseProps {
8
- /** Active flag that sets the visual state of the SidebarMenuItem and
9
- * also expands the SidebarSubMenu, if there is one included.
10
- */
11
- active: boolean;
12
- }
13
-
14
- /**
15
- * Child of the Sidebar component that should include exactly one SidebarMenuItem
16
- * and an optional SidebarSubMenu.
17
- */
18
- const SidebarMenu: React.FunctionComponent<Props> = (props: Props) => {
19
- const { active, ...rest } = props;
20
- const [hasSubMenu, setHasSubMenu] = useState(false);
21
-
22
- return (
23
- // eslint-disable-next-line react/jsx-no-constructed-context-values
24
- <SidebarMenuContext.Provider value={{ active, hasSubMenu, setHasSubMenu }}>
25
- <Base {...rest} className="Sidebar__menu" />
26
- </SidebarMenuContext.Provider>
27
- );
28
- };
29
-
30
- export default SidebarMenu;
@@ -1,7 +0,0 @@
1
- import { createContext } from 'react';
2
-
3
- export const SidebarMenuContext = createContext({
4
- active: false,
5
- hasSubMenu: false,
6
- setHasSubMenu: (hasSubMenu: boolean) => { hasSubMenu; },
7
- });
@@ -1,67 +0,0 @@
1
- import * as React from 'react';
2
- import classnames from 'classnames';
3
- import { TypeIconName } from '../Icon/tsx';
4
- import Base, { Props as BaseProps } from '../Base/Base';
5
- import Flex from '../Flex/Flex';
6
- import Icon from '../Icon/Icon';
7
- import Visibility from '../Visibility/Visibility';
8
- import VisibilityContainer from '../Visibility/VisibilityContainer';
9
- import { SidebarMenuContext } from './SidebarMenuContext';
10
-
11
- const { useContext } = React;
12
-
13
- export interface Props extends BaseProps {
14
- Component?: BaseProps['Component'];
15
- /**
16
- * Name of an icon (from the Icon component) that should
17
- * appear next to the text.
18
- */
19
- icon?: TypeIconName;
20
- }
21
-
22
- /**
23
- * Child of the SidebarMenu component that is used to handle the
24
- * navigation when interacted with.
25
- */
26
- const SidebarMenuItem: React.FunctionComponent<Props> = (props: Props) => {
27
- const { children, icon, ...rest } = props;
28
- const { active, hasSubMenu } = useContext(SidebarMenuContext);
29
- const classes = classnames('Sidebar__menu-item', {
30
- 'Sidebar__menu-item--active': active,
31
- });
32
-
33
- return (
34
- <Base className={classes} padding="x1">
35
- <VisibilityContainer
36
- {...rest}
37
- alignChildrenVertical="middle"
38
- className="Sidebar__menu-item-link"
39
- direction="horizontal"
40
- enabled={!active}
41
- gap="x4"
42
- >
43
- {icon && (
44
- <Flex>
45
- <Icon name={icon} />
46
- </Flex>
47
- )}
48
-
49
- <Flex grow initial="none">
50
- {children}
51
- </Flex>
52
-
53
- {hasSubMenu && (
54
- <Visibility>
55
- <Icon name="ChevronDown" />
56
- </Visibility>
57
- )}
58
- </VisibilityContainer>
59
- </Base>
60
- );
61
- };
62
-
63
- SidebarMenuItem.defaultProps = {
64
- Component: 'a',
65
- };
66
-
67
- export default SidebarMenuItem;
@@ -1,33 +0,0 @@
1
- import * as React from 'react';
2
- import Expand, { Props as ExpandProps } from '../Expand/Expand';
3
- import { SidebarMenuContext } from './SidebarMenuContext';
4
-
5
- const { useContext, useEffect } = React;
6
-
7
- export type Props = Omit<ExpandProps, 'expanded'>;
8
-
9
- /**
10
- * Child of the SidebarMenu component that is used to insert an
11
- * expandable submenu that is visible when the parent SidebarMenu
12
- * component is active.
13
- */
14
- const SidebarSubMenu: React.FunctionComponent<Props> = (props: Props) => {
15
- const { children, ...rest } = props;
16
- const { active, setHasSubMenu } = useContext(SidebarMenuContext);
17
-
18
- useEffect(() => {
19
- setHasSubMenu(true);
20
-
21
- return () => {
22
- setHasSubMenu(false);
23
- };
24
- }, []);
25
-
26
- return (
27
- <Expand {...rest} className="Sidebar__sub-menu" expanded={active}>
28
- {children}
29
- </Expand>
30
- );
31
- };
32
-
33
- export default SidebarSubMenu;
@@ -1,59 +0,0 @@
1
- import * as React from 'react';
2
- import classnames from 'classnames';
3
- import Flex, { Props as FlexProps } from '../Flex/Flex';
4
- import Icon from '../Icon/Icon';
5
- import { TypeIconName } from '../Icon/tsx';
6
-
7
- export interface Props extends FlexProps {
8
- /**
9
- * Active flag that sets the visual state.
10
- */
11
- active: boolean;
12
- /**
13
- * Name of an icon (from the Icon component) that should
14
- * appear next to the text.
15
- */
16
- icon?: TypeIconName;
17
- /** onClick event handler. */
18
- onClick?: (event: React.SyntheticEvent) => void;
19
- }
20
-
21
- /**
22
- * Child of the SidebarSubMenu component that is used to handle the
23
- * navigation when interacted with.
24
- */
25
- const SidebarSubMenuItem: React.FunctionComponent<Props> = (props: Props) => {
26
- const { active, children, icon, onClick, ...rest } = props;
27
- const classes = classnames('Sidebar__sub-menu-item', {
28
- 'Sidebar__sub-menu-item--active': active,
29
- });
30
-
31
- const handleClick = (event: React.SyntheticEvent) => {
32
- event.stopPropagation();
33
-
34
- if (onClick) {
35
- onClick(event);
36
- }
37
- };
38
-
39
- return (
40
- <Flex
41
- {...rest}
42
- alignChildrenVertical="middle"
43
- className={classes}
44
- direction="horizontal"
45
- gap="x4"
46
- onClick={handleClick}
47
- >
48
- {icon && (
49
- <Flex>
50
- <Icon name={icon} textColor="purple.70" />
51
- </Flex>
52
- )}
53
-
54
- <Flex>{children}</Flex>
55
- </Flex>
56
- );
57
- };
58
-
59
- export default SidebarSubMenuItem;
@@ -1,43 +0,0 @@
1
- import * as React from 'react';
2
- import { useMediaQuery } from '../hooks';
3
- import Flex, { Props as FlexProps } from '../Flex/Flex';
4
- import Image from '../Image/Image';
5
- import Text from '../Text/Text';
6
-
7
- export type Props = FlexProps;
8
-
9
- /**
10
- * A composite component used as a placeholder page for when there
11
- * is a 404 page cannot be found error.
12
- */
13
- const Status404: React.FunctionComponent<Props> = (props: Props) => {
14
- const match = useMediaQuery(['65rem']);
15
-
16
- return (
17
- <Flex {...props}>
18
- <Flex
19
- alignChildren="middle"
20
- direction={match('65rem') ? 'horizontal' : 'vertical'}
21
- gap={match('65rem') ? 'x8' : 'x4'}
22
- paddingHorizontal="x6"
23
- >
24
- <Text align="middle" size="7" weight="bold">
25
- 404
26
- </Text>
27
- <Text align="middle" size="6" weight="bold">
28
- The coordinates you are looking for do not exist
29
- </Text>
30
- </Flex>
31
-
32
- <Flex container grow height="33.125rem" overflow="hidden">
33
- <Image
34
- absolute="center"
35
- height="530px"
36
- src="https://bitrise-bitkit.s3.us-east-2.amazonaws.com/assets/Status404.svg"
37
- />
38
- </Flex>
39
- </Flex>
40
- );
41
- };
42
-
43
- export default Status404;
@@ -1,23 +0,0 @@
1
- import * as React from 'react';
2
- import classnames from 'classnames';
3
- import Text, { Props as TextProps } from '../Text/Text';
4
-
5
- export interface Props extends TextProps {
6
- /** Sets the styling to indicate that the tab is active. */
7
- active?: boolean;
8
- }
9
-
10
- /**
11
- * Individual navigation item component that should be a direct
12
- * descendant of the Tabs component.
13
- */
14
- const Tab: React.FunctionComponent<Props> = (props: Props) => {
15
- const { active, ...rest } = props;
16
- const classes = classnames('Tabs__tab', {
17
- 'Tabs__tab--active': active,
18
- });
19
-
20
- return <Text {...rest} className={classes} letterSpacing="x2" uppercase weight="bold" />;
21
- };
22
-
23
- export default Tab;
@@ -1,30 +0,0 @@
1
- .Tabs__tab {
2
- position: relative;
3
- padding-top: var(--size--x3);
4
- padding-bottom: var(--size--x3);
5
- color: var(--color-eggplant);
6
- cursor: pointer;
7
- }
8
-
9
- .Tabs__tab::before {
10
- content: '';
11
- position: absolute;
12
- right: 0;
13
- bottom: 0;
14
- left: 0;
15
- height: 0.1875rem;
16
- border-top-left-radius: var(--size--x1);
17
- border-top-right-radius: var(--size--x1);
18
- background-color: transparent;
19
- transition-property: background-color, color;
20
- transition-duration: var(--transition-duration--fast);
21
- transition-timing-function: var(--transition-timing-function);
22
- }
23
-
24
- .Tabs__tab--active {
25
- color: var(--color-grape--5);
26
- }
27
-
28
- .Tabs__tab--active::before {
29
- background-color: var(--color-aqua--3);
30
- }
@@ -1,18 +0,0 @@
1
- import * as React from 'react';
2
- import Flex, { Props as FlexProps } from '../Flex/Flex';
3
- import './Tabs.css';
4
-
5
- export type Props = FlexProps;
6
-
7
- /**
8
- * Tabular navigation component, that holds the Tab components.
9
- */
10
- const Tabs: React.FunctionComponent<Props> = (props: Props) => {
11
- return <Flex {...props} direction="horizontal" />;
12
- };
13
-
14
- Tabs.defaultProps = {
15
- gap: 'x16',
16
- };
17
-
18
- export default Tabs;
@@ -1,85 +0,0 @@
1
- import * as React from 'react';
2
- import { ReferenceChildrenProps } from 'react-popper';
3
- import { Placement as TypePlacement } from '@popperjs/core';
4
- import { Props as BaseProps } from '../Base/Base';
5
- import Placement from '../Placement/Placement';
6
- import PlacementArea from '../Placement/PlacementArea';
7
- import PlacementManager from '../Placement/PlacementManager';
8
- import PlacementReference from '../Placement/PlacementReference';
9
- import Text from '../Text/Text';
10
- import { transitionDurationFast } from '../variables';
11
-
12
- const { useState } = React;
13
-
14
- interface TooltipChildrenProps extends ReferenceChildrenProps {
15
- onMouseEnter?: () => void;
16
- onMouseLeave?: () => void;
17
- }
18
-
19
- export interface Props extends BaseProps {
20
- /** Render callback that passes the ref and event handlers onto a target */
21
- children: (props: TooltipChildrenProps) => React.ReactNode;
22
- /** The content to be inserted into the tooltip. */
23
- title: React.ReactNode;
24
- /** Flag that controls the visibility of the tooltip */
25
- visible?: boolean;
26
- /** The desired animation speed on milliseconds. */
27
- timeout?: number;
28
- /** The desired placement direction */
29
- placement?: TypePlacement;
30
- }
31
-
32
- /**
33
- * A simple tooltip component that shows textual content above
34
- * a target when the mouse is over it.
35
- */
36
- const Tooltip: React.FunctionComponent<Props> = (props: Props) => {
37
- const {
38
- backgroundColor = 'neutral.10',
39
- borderRadius = 'x1',
40
- children,
41
- placement = 'top',
42
- textColor = 'neutral.95',
43
- title,
44
- visible: controlledVisible,
45
- timeout = transitionDurationFast,
46
- ...rest
47
- } = props;
48
- const [uncontrolledVisible, setVisible] = useState(controlledVisible || false);
49
- const isControlled = controlledVisible !== undefined;
50
-
51
- const handleMouseEnter = () => setVisible(true);
52
- const handleMouseLeave = () => setVisible(false);
53
-
54
- return (
55
- <PlacementManager>
56
- <Placement
57
- backgroundColor={backgroundColor}
58
- borderRadius={borderRadius}
59
- placement={placement}
60
- textColor={textColor}
61
- timeout={timeout}
62
- {...rest}
63
- visible={isControlled ? controlledVisible : uncontrolledVisible}
64
- >
65
- {() => (
66
- <PlacementArea paddingHorizontal="x3" paddingVertical="x2" withArrow>
67
- <Text size="2">{title}</Text>
68
- </PlacementArea>
69
- )}
70
- </Placement>
71
-
72
- <PlacementReference>
73
- {(properties) =>
74
- children({
75
- ...properties,
76
- onMouseEnter: isControlled ? undefined : handleMouseEnter,
77
- onMouseLeave: isControlled ? undefined : handleMouseLeave,
78
- })
79
- }
80
- </PlacementReference>
81
- </PlacementManager>
82
- );
83
- };
84
-
85
- export default Tooltip;
@@ -1,40 +0,0 @@
1
- import { useLayoutEffect, useState } from 'react';
2
- import { ResizeObserver as ResizeObserverPolyfill } from '@juggle/resize-observer';
3
-
4
- export type DOMRectReadOnlyWithoutToJSON = Omit<DOMRectReadOnly, 'toJSON'>;
5
-
6
- export default (): [DOMRectReadOnlyWithoutToJSON, (element: Element | null) => void] => {
7
- const [node, setNode] = useState<Element | null>(null);
8
- const [size, setSize] = useState<DOMRectReadOnlyWithoutToJSON>({
9
- bottom: 0,
10
- height: 0,
11
- left: 0,
12
- right: 0,
13
- top: 0,
14
- width: 0,
15
- x: 0,
16
- y: 0,
17
- });
18
-
19
- useLayoutEffect(() => {
20
- const observer: ResizeObserver = new ResizeObserverPolyfill(([entry]) => {
21
- if (entry) {
22
- setSize(entry.contentRect);
23
- }
24
- });
25
-
26
- if (node) {
27
- observer.observe(node);
28
- }
29
-
30
- return () => {
31
- if (node) {
32
- observer.unobserve(node);
33
- }
34
-
35
- observer.disconnect();
36
- };
37
- }, [node]);
38
-
39
- return [size, setNode];
40
- };