Skip to content

Commit

Permalink
Merge branch 'new/dropdown' of github.com:RocketChat/Rocket.Chat.Fuse…
Browse files Browse the repository at this point in the history
…lage into new/dropdown

* 'new/dropdown' of github.com:RocketChat/Rocket.Chat.Fuselage:
  feat: @rocket.chat/string-helpers (#431)
  Fix develop (#432)
  fix: Hollow shapes for status (#430)
  fix: Modal close button size (#420)
  new: Add shredder icon for OTR messages (#423)
  fix: Change highlighted style (#422)
  fix: Tabs design update (#427)
  chore(build): Remove CircleCI configuration
  fix: Prefer null over undefined on BoxTransforms (#426)
  fix: Add more props to Throbber type definition (#429)
  fix: Remove reference to inexistent interface (#424)
  • Loading branch information
gabriellsh committed Apr 26, 2021
2 parents f443252 + 63baa9e commit 385ea32
Show file tree
Hide file tree
Showing 117 changed files with 1,004 additions and 256 deletions.
105 changes: 0 additions & 105 deletions .circleci/config.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
{
"eslint.workingDirectories": [
{
"directory": "packages/css-in-js",
"changeProcessCWD": true
},
{
"directory": "packages/emitter",
"changeProcessCWD": true
},
{
"directory": "packages/fuselage",
"changeProcessCWD": true
Expand All @@ -16,6 +24,18 @@
"directory": "packages/icons",
"changeProcessCWD": true
},
{
"directory": "packages/memo",
"changeProcessCWD": true
},
{
"directory": "packages/mp3-encoder",
"changeProcessCWD": true
},
{
"directory": "packages/string-helpers",
"changeProcessCWD": true
},
{
"directory": "packages/ui-kit",
"changeProcessCWD": true
Expand Down
8 changes: 4 additions & 4 deletions .yarn/releases/yarn-berry.cjs

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{
"private": true,
"workspaces": {
"packages": [
"packages/*"
]
},
"workspaces": [
"packages/*"
],
"devDependencies": {
"husky": "^5.1.1",
"lerna": "^3.20.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/css-in-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^11.0.1",
"@rollup/plugin-typescript": "^8.1.0",
"@types/jest": "^26.0.19",
"@types/jest": "^26.0.22",
"@types/stylis": "^4.0.0",
"@typescript-eslint/eslint-plugin": "^4.11.0",
"@typescript-eslint/parser": "^4.11.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/emitter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^11.0.1",
"@rollup/plugin-typescript": "^8.1.0",
"@types/jest": "^26.0.19",
"@types/jest": "^26.0.22",
"@typescript-eslint/eslint-plugin": "^4.11.1",
"@typescript-eslint/parser": "^4.11.1",
"documentation": "^13.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/fuselage-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"@rollup/plugin-typescript": "^6.0.0",
"@types/jest": "^26.0.15",
"@types/jest": "^26.0.22",
"@types/react-dom": "^16.9.8",
"@types/resize-observer-browser": "^0.1.3",
"@types/use-subscription": "^1.0.0",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 6 additions & 4 deletions packages/fuselage/fuselage.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ declare module '@rocket.chat/fuselage' {
variant?: 'neutral' | 'info' | 'success' | 'warning' | 'danger';
onAction?: () => void;
onClose?: () => void;
} & AllHTMLAttributes<HTMLSectionElement>;
} & AllHTMLAttributes<HTMLElement>;
export const Banner: FC<BannerProps>;

type ButtonProps = BoxProps & {
Expand Down Expand Up @@ -433,9 +433,11 @@ declare module '@rocket.chat/fuselage' {
type TileProps = BoxProps;
export const Tile: ForwardRefExoticComponent<TileProps>;

type ThrobberProps = Omit<BoxProps, 'size'> & {
size?: BoxProps['width'];
type ThrobberProps = Omit<BoxProps, 'disabled' | 'size'> & {
circleCount?: number;
disabled?: boolean;
inheritColor?: boolean;
size?: BoxProps['width'];
};
export const Throbber: ForwardRefExoticComponent<ThrobberProps>;

Expand Down Expand Up @@ -470,6 +472,6 @@ declare module '@rocket.chat/fuselage' {
type StatusBulletProps = {
status?: 'loading' | 'online' | 'busy' | 'away' | 'offline';
size?: 'small' | 'large';
} & Omit<AllHTMLAttributes<HTMLSpanElement>, 'size'>;
} & Omit<AllHTMLAttributes<HTMLElement>, 'size'>;
export const StatusBullet: FC<StatusBulletProps>;
}
2 changes: 1 addition & 1 deletion packages/fuselage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"@storybook/react": "^6.1.11",
"@storybook/source-loader": "^6.1.11",
"@storybook/theming": "^6.1.11",
"@types/jest": "^26.0.20",
"@types/jest": "^26.0.22",
"autoprefixer": "^10.0.1",
"babel-loader": "^8.1.0",
"caniuse-lite": "^1.0.30001151",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React, { useCallback, useEffect, useState } from 'react';

import { appendClassName } from '../../../helpers/appendClassName';
import { useStyle } from '../../../hooks/useStyle';
import { BoxTransforms, useComposedBoxTransform } from '../transforms';
import { BoxTransforms, useComposedBoxTransform } from '../BoxTransforms';

function AnimatedVisibility({
children,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { createContext, useContext, useMemo } from 'react';

export const BoxTransforms = createContext();
export const BoxTransforms = createContext<null | ((props: any) => any)>(null);

export const useBoxTransform = () => useContext(BoxTransforms);

export const useComposedBoxTransform = (fn) => {
export const useComposedBoxTransform = (fn: (props: any) => any) => {
const parentFn = useContext(BoxTransforms);

return useMemo(() => {
Expand All @@ -16,6 +16,6 @@ export const useComposedBoxTransform = (fn) => {
return parentFn;
}

return (...args) => fn(parentFn(...args));
return (props: any) => fn(parentFn(props));
}, [fn, parentFn]);
};
2 changes: 1 addition & 1 deletion packages/fuselage/src/components/Box/Flex/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import PropTypes from 'prop-types';
import React, { useCallback } from 'react';

import { BoxTransforms, useComposedBoxTransform } from '../transforms';
import { BoxTransforms, useComposedBoxTransform } from '../BoxTransforms';

function FlexContainer({
inline = false,
Expand Down
2 changes: 1 addition & 1 deletion packages/fuselage/src/components/Box/Scrollable/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React, { useRef, useCallback } from 'react';

import { appendClassName } from '../../../helpers/appendClassName';
import { useStyle } from '../../../hooks/useStyle';
import { BoxTransforms, useComposedBoxTransform } from '../transforms';
import { BoxTransforms, useComposedBoxTransform } from '../BoxTransforms';

const getTouchingEdges = (element) => ({
top: !element.scrollTop,
Expand Down
4 changes: 2 additions & 2 deletions packages/fuselage/src/components/Box/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import { appendClassName } from '../../helpers/appendClassName';
import { prependClassName } from '../../helpers/prependClassName';
import { useStyle } from '../../hooks/useStyle';
import { useStyleSheet } from '../../hooks/useStyleSheet';
import { useBoxTransform, BoxTransforms } from './BoxTransforms';
import {
/* propTypes as stylingPropsPropTypes, */ useStylingProps,
} from './stylingProps';
import { useBoxTransform, BoxTransforms } from './transforms';

export const useArrayLikeClassNameProp = (props) => {
const classNames = [].concat(props.className);
Expand Down Expand Up @@ -98,7 +98,7 @@ export const Box = memo(
const element = createElement(is, props, children);

if (transformFn) {
return <BoxTransforms.Provider children={element} />;
return <BoxTransforms.Provider children={element} value={null} />;
}

return element;
Expand Down
2 changes: 1 addition & 1 deletion packages/fuselage/src/components/Margins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { createPropType } from '../../helpers/createPropType';
import { patchChildren } from '../../helpers/patchChildren';
import { useStyle } from '../../hooks/useStyle';
import { margin } from '../../styleTokens';
import { BoxTransforms, useComposedBoxTransform } from '../Box/transforms';
import { BoxTransforms, useComposedBoxTransform } from '../Box/BoxTransforms';

function Margins(props) {
const {
Expand Down
7 changes: 2 additions & 5 deletions packages/fuselage/src/components/Modal/ModalClose.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import React from 'react';

import { Button } from '../Button';
import { Icon } from '../Icon';
import { ActionButton } from '../Button';

export const ModalClose = (props) => (
<Button small ghost flexShrink={0} {...props}>
<Icon name='cross' size='x24' />
</Button>
<ActionButton small ghost flexShrink={0} {...props} icon='cross' />
);
1 change: 0 additions & 1 deletion packages/fuselage/src/components/Sidebar/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ $sidebar-item-color-selected: theme(
}

%highlighted {
@include typography.use-font-scale(p2);
color: $sidebar-item-color-highlighted;
}

Expand Down
3 changes: 1 addition & 2 deletions packages/fuselage/src/components/StatusBullet/icons/away.svg
3 changes: 1 addition & 2 deletions packages/fuselage/src/components/StatusBullet/icons/busy.svg
Loading

0 comments on commit 385ea32

Please sign in to comment.