@bitrise/bitkit 10.0.2 → 10.1.0-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.
- package/package.json +23 -57
- package/src/Components/Tabs/Tab.tsx +2 -24
- package/src/Old/DatePicker/DatePicker.tsx +6 -6
- package/src/Old/DatePicker/DatePickerMonth.tsx +7 -7
- package/src/Old/Dropdown/Dropdown.tsx +3 -5
- package/src/Old/Dropdown/DropdownButton.tsx +2 -16
- package/src/Old/Dropdown/DropdownMenuItem.tsx +1 -2
- package/src/Old/Dropdown/DropdownMenuItemGroup.tsx +2 -2
- package/src/Old/Input/InputInlineHelp.tsx +2 -2
- package/src/Old/Input/InputLabel.tsx +2 -2
- package/src/Old/Notification/Notification.tsx +3 -4
- package/src/Old/Notification/__snapshots__/Notification.test.tsx.snap +8 -12
- package/src/Old/Progress/ProgressBitbot.tsx +3 -3
- package/src/Old/Ribbon/Ribbon.tsx +4 -4
- package/src/Old/Status/Status404.tsx +3 -3
- package/src/Old/Status/Status500.tsx +4 -4
- package/src/Old/Table/TableCell.tsx +3 -3
- package/src/Old/Table/TableHeaderCell.tsx +7 -6
- package/src/Old/Toggle/Toggle.tsx +1 -1
- package/src/Old/hooks/index.ts +0 -1
- package/src/Old/variables.css +0 -1
- package/src/Old/variables.ts +0 -3
- package/src/index.ts +0 -3
- package/src/old.ts +0 -64
- package/src/tsconfig.tsbuildinfo +1 -1
- package/src/Components/Transitions/Fade.stories.tsx +0 -26
- package/src/Components/Transitions/Fade.tsx +0 -12
- package/src/Old/AddonBeam/AddonBeam.css +0 -16
- package/src/Old/AddonBeam/AddonBeam.tsx +0 -117
- package/src/Old/AddonBeam/AddonBeamLink.tsx +0 -37
- package/src/Old/AddonFooter/AddonFooter.tsx +0 -24
- package/src/Old/AppLayout/AppLayout.css +0 -45
- package/src/Old/AppLayout/AppLayout.tsx +0 -21
- package/src/Old/AppLayout/AppLayoutBody.tsx +0 -10
- package/src/Old/AppLayout/AppLayoutHeader.tsx +0 -10
- package/src/Old/AppLayout/AppLayoutMain.tsx +0 -10
- package/src/Old/AppLayout/AppLayoutSidebar.tsx +0 -10
- package/src/Old/Avatar/Avatar.css +0 -4
- package/src/Old/Avatar/Avatar.tsx +0 -64
- package/src/Old/Avatar/avatarColors.ts +0 -26
- package/src/Old/Bounds/Bounds.tsx +0 -20
- package/src/Old/Button/Button.css +0 -249
- package/src/Old/Button/Button.test.tsx +0 -29
- package/src/Old/Button/Button.tsx +0 -55
- package/src/Old/Button/ButtonSize.ts +0 -3
- package/src/Old/Button/Buttons.test.tsx +0 -42
- package/src/Old/Button/Buttons.tsx +0 -34
- package/src/Old/Button/__snapshots__/Button.test.tsx.snap +0 -73
- package/src/Old/Button/__snapshots__/Buttons.test.tsx.snap +0 -45
- package/src/Old/ExternalLink/ExternalLink.tsx +0 -24
- package/src/Old/Icon/Icon.css +0 -4
- package/src/Old/Icon/Icon.tsx +0 -32
- package/src/Old/Icon/tsx/IconsAddOns.tsx +0 -14
- package/src/Old/Icon/tsx/IconsAddOnsColorTuorqouise.tsx +0 -20
- package/src/Old/Icon/tsx/IconsAddOnsColorViolet.tsx +0 -20
- package/src/Old/Icon/tsx/IconsAddOnsWhite.tsx +0 -20
- package/src/Old/Icon/tsx/IconsApp.tsx +0 -16
- package/src/Old/Icon/tsx/IconsArrowBack.tsx +0 -14
- package/src/Old/Icon/tsx/IconsArrowDown.tsx +0 -21
- package/src/Old/Icon/tsx/IconsArrowForward.tsx +0 -16
- package/src/Old/Icon/tsx/IconsArrowQuit.tsx +0 -14
- package/src/Old/Icon/tsx/IconsArrowUp.tsx +0 -14
- package/src/Old/Icon/tsx/IconsBackArrow.tsx +0 -13
- package/src/Old/Icon/tsx/IconsBell.tsx +0 -16
- package/src/Old/Icon/tsx/IconsBitbot.tsx +0 -16
- package/src/Old/Icon/tsx/IconsBitbotFailed.tsx +0 -18
- package/src/Old/Icon/tsx/IconsBitbucket.tsx +0 -26
- package/src/Old/Icon/tsx/IconsBitbucketFill.tsx +0 -14
- package/src/Old/Icon/tsx/IconsBitriseCertified.tsx +0 -19
- package/src/Old/Icon/tsx/IconsBook.tsx +0 -16
- package/src/Old/Icon/tsx/IconsBranchBranch.tsx +0 -16
- package/src/Old/Icon/tsx/IconsBranchCommit.tsx +0 -14
- package/src/Old/Icon/tsx/IconsBranchPull.tsx +0 -16
- package/src/Old/Icon/tsx/IconsBranchPush.tsx +0 -21
- package/src/Old/Icon/tsx/IconsBranchTag.tsx +0 -16
- package/src/Old/Icon/tsx/IconsBug.tsx +0 -16
- package/src/Old/Icon/tsx/IconsBuild.tsx +0 -14
- package/src/Old/Icon/tsx/IconsBuildstatusAborted.tsx +0 -16
- package/src/Old/Icon/tsx/IconsBuildstatusAbortedSolid.tsx +0 -15
- package/src/Old/Icon/tsx/IconsBuildstatusFailed.tsx +0 -16
- package/src/Old/Icon/tsx/IconsBuildstatusFailedSolid.tsx +0 -15
- package/src/Old/Icon/tsx/IconsBuildstatusLoading.tsx +0 -13
- package/src/Old/Icon/tsx/IconsBuildstatusLoadingAnimated.tsx +0 -31
- package/src/Old/Icon/tsx/IconsBuildstatusLoadingeeehh.tsx +0 -13
- package/src/Old/Icon/tsx/IconsBuildstatusLoadingeeehhWhite.tsx +0 -13
- package/src/Old/Icon/tsx/IconsBuildstatusNeverbuilt.tsx +0 -14
- package/src/Old/Icon/tsx/IconsBuildstatusSuccessful.tsx +0 -16
- package/src/Old/Icon/tsx/IconsBuildstatusSuccessfulSolid.tsx +0 -15
- package/src/Old/Icon/tsx/IconsCalendar.tsx +0 -16
- package/src/Old/Icon/tsx/IconsChain.tsx +0 -16
- package/src/Old/Icon/tsx/IconsChangePlan.tsx +0 -14
- package/src/Old/Icon/tsx/IconsChat.tsx +0 -14
- package/src/Old/Icon/tsx/IconsChatMessage.tsx +0 -16
- package/src/Old/Icon/tsx/IconsChevronDown.tsx +0 -13
- package/src/Old/Icon/tsx/IconsChevronLeft.tsx +0 -16
- package/src/Old/Icon/tsx/IconsChevronRight.tsx +0 -16
- package/src/Old/Icon/tsx/IconsChevronUp.tsx +0 -15
- package/src/Old/Icon/tsx/IconsClock.tsx +0 -16
- package/src/Old/Icon/tsx/IconsCloseSmall.tsx +0 -16
- package/src/Old/Icon/tsx/IconsCode.tsx +0 -16
- package/src/Old/Icon/tsx/IconsCoffee.tsx +0 -16
- package/src/Old/Icon/tsx/IconsConsole.tsx +0 -16
- package/src/Old/Icon/tsx/IconsCredit.tsx +0 -21
- package/src/Old/Icon/tsx/IconsCreditcard.tsx +0 -16
- package/src/Old/Icon/tsx/IconsDeleteNope.tsx +0 -15
- package/src/Old/Icon/tsx/IconsDeployment.tsx +0 -14
- package/src/Old/Icon/tsx/IconsDoc.tsx +0 -16
- package/src/Old/Icon/tsx/IconsDollars.tsx +0 -16
- package/src/Old/Icon/tsx/IconsDownload.tsx +0 -16
- package/src/Old/Icon/tsx/IconsDropdownArrows.tsx +0 -16
- package/src/Old/Icon/tsx/IconsDudes.tsx +0 -14
- package/src/Old/Icon/tsx/IconsDuplicate.tsx +0 -14
- package/src/Old/Icon/tsx/IconsEnterprise.tsx +0 -19
- package/src/Old/Icon/tsx/IconsErrorGeneral.tsx +0 -16
- package/src/Old/Icon/tsx/IconsFileDoc.tsx +0 -16
- package/src/Old/Icon/tsx/IconsFilePdf.tsx +0 -16
- package/src/Old/Icon/tsx/IconsFilePlist.tsx +0 -16
- package/src/Old/Icon/tsx/IconsFileZip.tsx +0 -16
- package/src/Old/Icon/tsx/IconsFilter.tsx +0 -16
- package/src/Old/Icon/tsx/IconsFlag.tsx +0 -13
- package/src/Old/Icon/tsx/IconsFolder.tsx +0 -16
- package/src/Old/Icon/tsx/IconsFullscreen.tsx +0 -14
- package/src/Old/Icon/tsx/IconsFullscreenExit.tsx +0 -14
- package/src/Old/Icon/tsx/IconsGauge.tsx +0 -16
- package/src/Old/Icon/tsx/IconsGithub.tsx +0 -14
- package/src/Old/Icon/tsx/IconsGitlab.tsx +0 -20
- package/src/Old/Icon/tsx/IconsGitlabFill.tsx +0 -14
- package/src/Old/Icon/tsx/IconsGlobe.tsx +0 -16
- package/src/Old/Icon/tsx/IconsGroup.tsx +0 -14
- package/src/Old/Icon/tsx/IconsHeart.tsx +0 -14
- package/src/Old/Icon/tsx/IconsHidePassword.tsx +0 -19
- package/src/Old/Icon/tsx/IconsHistory.tsx +0 -14
- package/src/Old/Icon/tsx/IconsImage.tsx +0 -14
- package/src/Old/Icon/tsx/IconsInfo.tsx +0 -14
- package/src/Old/Icon/tsx/IconsIntegrations.tsx +0 -14
- package/src/Old/Icon/tsx/IconsInteraction.tsx +0 -14
- package/src/Old/Icon/tsx/IconsInvoice.tsx +0 -16
- package/src/Old/Icon/tsx/IconsJapanese.tsx +0 -15
- package/src/Old/Icon/tsx/IconsKey.tsx +0 -14
- package/src/Old/Icon/tsx/IconsLaptop.tsx +0 -13
- package/src/Old/Icon/tsx/IconsLaptops.tsx +0 -16
- package/src/Old/Icon/tsx/IconsLightbulb.tsx +0 -16
- package/src/Old/Icon/tsx/IconsLock.tsx +0 -16
- package/src/Old/Icon/tsx/IconsLogin.tsx +0 -16
- package/src/Old/Icon/tsx/IconsLogout.tsx +0 -16
- package/src/Old/Icon/tsx/IconsMagnifier.tsx +0 -16
- package/src/Old/Icon/tsx/IconsMail.tsx +0 -16
- package/src/Old/Icon/tsx/IconsMenuGrid.tsx +0 -16
- package/src/Old/Icon/tsx/IconsMenuHamburger.tsx +0 -13
- package/src/Old/Icon/tsx/IconsMessage.tsx +0 -16
- package/src/Old/Icon/tsx/IconsMinusClose.tsx +0 -10
- package/src/Old/Icon/tsx/IconsMinusRemove.tsx +0 -16
- package/src/Old/Icon/tsx/IconsMobile.tsx +0 -16
- package/src/Old/Icon/tsx/IconsMonitoring.tsx +0 -14
- package/src/Old/Icon/tsx/IconsMoreHorizontal.tsx +0 -13
- package/src/Old/Icon/tsx/IconsMoreVertical.tsx +0 -17
- package/src/Old/Icon/tsx/IconsNoTie.tsx +0 -14
- package/src/Old/Icon/tsx/IconsNumero.tsx +0 -16
- package/src/Old/Icon/tsx/IconsOpenInBrowser.tsx +0 -16
- package/src/Old/Icon/tsx/IconsOverview.tsx +0 -14
- package/src/Old/Icon/tsx/IconsOwner.tsx +0 -19
- package/src/Old/Icon/tsx/IconsPause.tsx +0 -14
- package/src/Old/Icon/tsx/IconsPencil.tsx +0 -17
- package/src/Old/Icon/tsx/IconsPercent.tsx +0 -14
- package/src/Old/Icon/tsx/IconsPerson.tsx +0 -14
- package/src/Old/Icon/tsx/IconsPlatformsAndroid.tsx +0 -16
- package/src/Old/Icon/tsx/IconsPlatformsApple.tsx +0 -16
- package/src/Old/Icon/tsx/IconsPlatformsCordova.tsx +0 -14
- package/src/Old/Icon/tsx/IconsPlatformsFastlane.tsx +0 -14
- package/src/Old/Icon/tsx/IconsPlatformsFlutter.tsx +0 -14
- package/src/Old/Icon/tsx/IconsPlatformsGo.tsx +0 -13
- package/src/Old/Icon/tsx/IconsPlatformsIonic.tsx +0 -14
- package/src/Old/Icon/tsx/IconsPlatformsMacos.tsx +0 -14
- package/src/Old/Icon/tsx/IconsPlatformsNodejs.tsx +0 -13
- package/src/Old/Icon/tsx/IconsPlatformsOther.tsx +0 -21
- package/src/Old/Icon/tsx/IconsPlatformsReact.tsx +0 -14
- package/src/Old/Icon/tsx/IconsPlatformsXamarin.tsx +0 -14
- package/src/Old/Icon/tsx/IconsPlay.tsx +0 -16
- package/src/Old/Icon/tsx/IconsPlusAdd.tsx +0 -16
- package/src/Old/Icon/tsx/IconsPlusOpen.tsx +0 -13
- package/src/Old/Icon/tsx/IconsPower.tsx +0 -11
- package/src/Old/Icon/tsx/IconsRefresh.tsx +0 -13
- package/src/Old/Icon/tsx/IconsRequest.tsx +0 -14
- package/src/Old/Icon/tsx/IconsResponsiveness.tsx +0 -14
- package/src/Old/Icon/tsx/IconsSave.tsx +0 -14
- package/src/Old/Icon/tsx/IconsSecurityShield.tsx +0 -16
- package/src/Old/Icon/tsx/IconsSettings.tsx +0 -16
- package/src/Old/Icon/tsx/IconsShip.tsx +0 -14
- package/src/Old/Icon/tsx/IconsShowPassword.tsx +0 -16
- package/src/Old/Icon/tsx/IconsShuffle.tsx +0 -16
- package/src/Old/Icon/tsx/IconsStability.tsx +0 -16
- package/src/Old/Icon/tsx/IconsStack.tsx +0 -16
- package/src/Old/Icon/tsx/IconsStatus.tsx +0 -16
- package/src/Old/Icon/tsx/IconsStepThirdParty.tsx +0 -16
- package/src/Old/Icon/tsx/IconsStepUpgrade.tsx +0 -10
- package/src/Old/Icon/tsx/IconsStepUpgradeCircle.tsx +0 -11
- package/src/Old/Icon/tsx/IconsStepVersionOk.tsx +0 -11
- package/src/Old/Icon/tsx/IconsSteps.tsx +0 -14
- package/src/Old/Icon/tsx/IconsStepsColorTuorqouise.tsx +0 -14
- package/src/Old/Icon/tsx/IconsStepsColorViolet.tsx +0 -14
- package/src/Old/Icon/tsx/IconsStepsWhite.tsx +0 -14
- package/src/Old/Icon/tsx/IconsStopwatch.tsx +0 -16
- package/src/Old/Icon/tsx/IconsSupport.tsx +0 -16
- package/src/Old/Icon/tsx/IconsSwitch.tsx +0 -13
- package/src/Old/Icon/tsx/IconsTestFailed.tsx +0 -14
- package/src/Old/Icon/tsx/IconsTestInconclusive.tsx +0 -14
- package/src/Old/Icon/tsx/IconsTestInfo.tsx +0 -14
- package/src/Old/Icon/tsx/IconsTestSkipped.tsx +0 -14
- package/src/Old/Icon/tsx/IconsTestSuccess.tsx +0 -14
- package/src/Old/Icon/tsx/IconsTestWarning.tsx +0 -14
- package/src/Old/Icon/tsx/IconsTick.tsx +0 -13
- package/src/Old/Icon/tsx/IconsTime.tsx +0 -16
- package/src/Old/Icon/tsx/IconsTrace.tsx +0 -14
- package/src/Old/Icon/tsx/IconsTrash.tsx +0 -16
- package/src/Old/Icon/tsx/IconsTrigger.tsx +0 -16
- package/src/Old/Icon/tsx/IconsTwitter.tsx +0 -16
- package/src/Old/Icon/tsx/IconsValidateShield.tsx +0 -16
- package/src/Old/Icon/tsx/IconsWarning.tsx +0 -16
- package/src/Old/Icon/tsx/IconsWebUi.tsx +0 -17
- package/src/Old/Icon/tsx/IconsWindow.tsx +0 -16
- package/src/Old/Icon/tsx/IconsWorkflow.tsx +0 -16
- package/src/Old/Icon/tsx/IconsWorkflowFlow.tsx +0 -16
- package/src/Old/Icon/tsx/IconsWow.tsx +0 -16
- package/src/Old/Icon/tsx/index.ts +0 -694
- package/src/Old/Link/Link.css +0 -44
- package/src/Old/Link/Link.tsx +0 -30
- package/src/Old/Modal/Modal.css +0 -67
- package/src/Old/Modal/Modal.tsx +0 -117
- package/src/Old/Modal/ModalBody.tsx +0 -17
- package/src/Old/Modal/ModalHeader.tsx +0 -50
- package/src/Old/Modal/ModalHeaderProgress.tsx +0 -23
- package/src/Old/Modal/ModalTitle.tsx +0 -13
- package/src/Old/Progress/ProgressButtonContent.tsx +0 -35
- package/src/Old/Sidebar/Sidebar.css +0 -125
- package/src/Old/Sidebar/Sidebar.tsx +0 -25
- package/src/Old/Sidebar/SidebarHeader.tsx +0 -10
- package/src/Old/Sidebar/SidebarMenu.tsx +0 -30
- package/src/Old/Sidebar/SidebarMenuContext.ts +0 -7
- package/src/Old/Sidebar/SidebarMenuItem.tsx +0 -67
- package/src/Old/Sidebar/SidebarSubMenu.tsx +0 -33
- package/src/Old/Sidebar/SidebarSubMenuItem.tsx +0 -59
- package/src/Old/Tabs/Tab.tsx +0 -23
- package/src/Old/Tabs/Tabs.css +0 -30
- package/src/Old/Tabs/Tabs.tsx +0 -18
- package/src/Old/Text/Text.css +0 -33
- package/src/Old/Text/Text.tsx +0 -87
- package/src/Old/Text/TextSizes.css +0 -39
- package/src/Old/Tooltip/Tooltip.tsx +0 -85
- package/src/Old/hooks/useResizeObserver.ts +0 -40
|
@@ -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;
|
package/src/Old/Tabs/Tab.tsx
DELETED
|
@@ -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;
|
package/src/Old/Tabs/Tabs.css
DELETED
|
@@ -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
|
-
}
|
package/src/Old/Tabs/Tabs.tsx
DELETED
|
@@ -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;
|
package/src/Old/Text/Text.css
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
.Text--align-start { text-align: left; }
|
|
2
|
-
.Text--align-middle { text-align: center; }
|
|
3
|
-
.Text--align-end { text-align: right; }
|
|
4
|
-
|
|
5
|
-
.Text--break-all { word-break: break-all; }
|
|
6
|
-
.Text--break-none { white-space: nowrap; }
|
|
7
|
-
.Text--break-word { word-wrap: break-word; }
|
|
8
|
-
|
|
9
|
-
.Text--letter-spacing-x1 { letter-spacing: var(--letter-spacing--x1); }
|
|
10
|
-
.Text--letter-spacing-x2 { letter-spacing: var(--letter-spacing--x2); }
|
|
11
|
-
.Text--letter-spacing-x3 { letter-spacing: var(--letter-spacing--x3); }
|
|
12
|
-
.Text--letter-spacing-x4 { letter-spacing: var(--letter-spacing--x4); }
|
|
13
|
-
.Text--letter-spacing-x5 { letter-spacing: var(--letter-spacing--x5); }
|
|
14
|
-
|
|
15
|
-
.Text--weight-bold { font-weight: var(--fontWeights-bold); }
|
|
16
|
-
|
|
17
|
-
.Text--ellipsis {
|
|
18
|
-
max-width: 100%;
|
|
19
|
-
text-overflow: ellipsis;
|
|
20
|
-
white-space: nowrap;
|
|
21
|
-
overflow: hidden;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.Text--emphasis { font-style: italic; }
|
|
25
|
-
|
|
26
|
-
.Text--titlecase { text-transform: capitalize; }
|
|
27
|
-
.Text--uppercase { text-transform: uppercase; }
|
|
28
|
-
|
|
29
|
-
.Text--monospace {
|
|
30
|
-
font-family: var(--font-family-monospace);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.Text--monospace.Text--weight-bold { font-weight: var(--font-weight-monospace--bold); }
|
package/src/Old/Text/Text.tsx
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import classnames from 'classnames';
|
|
3
|
-
import Base, { Props as BaseProps } from '../Base/Base';
|
|
4
|
-
import './TextSizes.css';
|
|
5
|
-
import './Text.css';
|
|
6
|
-
|
|
7
|
-
export type TypeTextLetterSpacing = 'x1' | 'x2' | 'x3' | 'x4' | 'x5';
|
|
8
|
-
export type TypeTextSize = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
|
|
9
|
-
export type TypeTextWeight = 'bold' | 'normal';
|
|
10
|
-
|
|
11
|
-
export interface Props extends BaseProps {
|
|
12
|
-
/**
|
|
13
|
-
* Sets the type of component to be rendered. Can be a
|
|
14
|
-
* string for an HTML tag or a React component.
|
|
15
|
-
* */
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17
|
-
Component?: string | React.ComponentType<any>;
|
|
18
|
-
/* Horizontal alignment of the child text */
|
|
19
|
-
align?: 'start' | 'middle' | 'end';
|
|
20
|
-
/* Sets how the text should break across lines when reaching the container width */
|
|
21
|
-
breakOn?: 'all' | 'none' | 'word';
|
|
22
|
-
/** @ignore */
|
|
23
|
-
className?: string;
|
|
24
|
-
/** Clips overflowing text with an ellipsis */
|
|
25
|
-
ellipsis?: boolean;
|
|
26
|
-
/** Empahsises text with an italic style */
|
|
27
|
-
emphasis?: boolean;
|
|
28
|
-
/** Sets the text to you inline layout */
|
|
29
|
-
inline?: boolean;
|
|
30
|
-
/** Adjusts the texts letter spacing to one of the curated values */
|
|
31
|
-
letterSpacing?: TypeTextLetterSpacing;
|
|
32
|
-
/** Sets the text to use a monospaced font family */
|
|
33
|
-
monospace?: boolean;
|
|
34
|
-
/* Shortcut for setting the correct combination of props for valid typeography design */
|
|
35
|
-
size?: TypeTextSize;
|
|
36
|
-
/** Sets the text to use title casing (first letter of each word is uppercase) */
|
|
37
|
-
titlecase?: boolean;
|
|
38
|
-
/** Sets the text to use uppercasing (every letter of each word is uppercase) */
|
|
39
|
-
uppercase?: boolean;
|
|
40
|
-
/** Adjusts the text weighting */
|
|
41
|
-
weight?: TypeTextWeight;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const InlineComponentMap = (props: Props) =>
|
|
45
|
-
(props.weight === 'bold' && 'strong') || (props.emphasis && 'em') || 'span';
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Generic text component that applies a wide variety of textual
|
|
49
|
-
* styling.
|
|
50
|
-
*/
|
|
51
|
-
const Text: React.FunctionComponent<Props> = (props: Props) => {
|
|
52
|
-
const {
|
|
53
|
-
Component,
|
|
54
|
-
align,
|
|
55
|
-
breakOn,
|
|
56
|
-
className,
|
|
57
|
-
ellipsis,
|
|
58
|
-
emphasis,
|
|
59
|
-
inline,
|
|
60
|
-
letterSpacing,
|
|
61
|
-
monospace,
|
|
62
|
-
size = '3',
|
|
63
|
-
titlecase,
|
|
64
|
-
uppercase,
|
|
65
|
-
weight,
|
|
66
|
-
...rest
|
|
67
|
-
} = props;
|
|
68
|
-
|
|
69
|
-
const classes = classnames(className, 'Text', {
|
|
70
|
-
'Text--ellipsis': ellipsis,
|
|
71
|
-
'Text--emphasis': emphasis,
|
|
72
|
-
'Text--monospace': monospace,
|
|
73
|
-
'Text--titlecase': titlecase,
|
|
74
|
-
'Text--uppercase': uppercase,
|
|
75
|
-
[`Text--align-${align}`]: align,
|
|
76
|
-
[`Text--break-${breakOn}`]: breakOn,
|
|
77
|
-
[`Text--letter-spacing-${letterSpacing}`]: letterSpacing,
|
|
78
|
-
[`Text--size-${size}`]: size,
|
|
79
|
-
'Text--weight-bold': weight === 'bold',
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
const component = inline ? InlineComponentMap(props) : Component;
|
|
83
|
-
|
|
84
|
-
return <Base {...rest} Component={component} className={classes} />;
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
export default Text;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
.Text--size-1 {
|
|
2
|
-
font-size: var(--fontSizes-1);
|
|
3
|
-
line-height: var(--lineHeights-1);
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.Text--size-2 {
|
|
7
|
-
font-size: var(--fontSizes-2);
|
|
8
|
-
line-height: var(--lineHeights-2);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.Text--size-3 {
|
|
12
|
-
font-size: var(--fontSizes-3);
|
|
13
|
-
line-height: var(--lineHeights-3);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.Text--size-4 {
|
|
17
|
-
font-size: var(--fontSizes-4);
|
|
18
|
-
line-height: var(--lineHeights-4);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.Text--size-5 {
|
|
22
|
-
font-size: var(--fontSizes-5);
|
|
23
|
-
line-height: var(--lineHeights-5);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.Text--size-6 {
|
|
27
|
-
font-size: var(--fontSizes-6);
|
|
28
|
-
line-height: var(--lineHeights-6);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.Text--size-7 {
|
|
32
|
-
font-size: var(--fontSizes-7);
|
|
33
|
-
line-height: var(--lineHeights-7);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.Text--size-8 {
|
|
37
|
-
font-size: var(--fontSizes-8);
|
|
38
|
-
line-height: var(--lineHeights-8);
|
|
39
|
-
}
|
|
@@ -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
|
-
};
|