Unverified Commit 0e0e1f99 authored by Tasso Evangelista's avatar Tasso Evangelista

Merge branch 'develop' of github.com:RocketChat/Rocket.Chat.Fuselage into new/geake

parents c0fb5bfc dbd5b908
......@@ -3,6 +3,41 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [0.21.0](https://github.com/RocketChat/Rocket.Chat.Fuselage/compare/v0.20.3...v0.21.0) (2021-01-31)
### Bug Fixes
* AvatarProps declaration ([#361](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/361)) ([6324875](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/6324875c68e0b7b11536e3b766c27eb8e301fe52))
* Banner surface adjustments ([#362](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/362)) ([2d59b7c](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/2d59b7c41962f24aa13face91a9b9f0ea8f1718a))
* Change option styles ([#358](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/358)) ([c479d70](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/c479d7041710e04fe8a9d8e766720ec206464e89))
* Pass appId and blockId from blocks to elements ([#366](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/366)) ([8a1b552](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/8a1b552f8dbc3a9b321d888f4a7e9dc9af2922cf))
* sidebar-item__menu-wraper opacity on IE ([#381](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/381)) ([3038b15](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/3038b15002d6df3d184a2dac2a97f5a3d0aa50f4))
* Temporary fix for auto complete ([#364](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/364)) ([218a8b3](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/218a8b30c42c7a2321f2de3d0cc081131e890834))
* TSConfig es5 target & es6 lib ([#378](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/378)) ([5802499](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/580249900584287203dad5e4da2acc1829759cbd))
* Update Fuselage typings ([#355](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/355)) ([85f9fa1](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/85f9fa13f818703bce1100ad706a66d703c0b0ba))
### Features
* Built modules for design tokens ([#356](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/356)) ([f9c3449](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/f9c344953b8161a4385cab3a3dcc8b6a7210446f))
* linear_scale element ([#365](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/365)) ([43a4c54](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/43a4c54ed10d096ef2259ddcd30c3bbd97ae866a))
## [0.20.3](https://github.com/RocketChat/Rocket.Chat.Fuselage/compare/v0.20.2...v0.20.3) (2021-01-29)
### Bug Fixes
* sidebar-item__menu-wraper opacity on IE ([#381](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/381)) ([e818b5c](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/e818b5cd99b1749997d6f487517c29722c77a23a))
## [0.20.2](https://github.com/RocketChat/Rocket.Chat.Fuselage/compare/v0.20.1...v0.20.2) (2021-01-27)
......
{
"version": "0.20.2",
"version": "0.21.0",
"npmClient": "yarn",
"useWorkspaces": true,
"packages": [
......
......@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [0.21.0](https://github.com/RocketChat/Rocket.Chat.Fuselage/compare/v0.20.3...v0.21.0) (2021-01-31)
### Bug Fixes
* TSConfig es5 target & es6 lib ([#378](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/378)) ([5802499](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/580249900584287203dad5e4da2acc1829759cbd))
### Features
* Built modules for design tokens ([#356](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/356)) ([f9c3449](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/f9c344953b8161a4385cab3a3dcc8b6a7210446f))
## [0.20.2](https://github.com/RocketChat/Rocket.Chat.Fuselage/compare/v0.20.1...v0.20.2) (2021-01-27)
......
{
"name": "@rocket.chat/css-in-js",
"version": "0.20.2",
"version": "0.21.0",
"description": "Toolset to transpile and use CSS on runtime",
"homepage": "https://rocketchat.github.io/Rocket.Chat.Fuselage/",
"author": {
......
......@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [0.21.0](https://github.com/RocketChat/Rocket.Chat.Fuselage/compare/v0.20.3...v0.21.0) (2021-01-31)
### Features
* Built modules for design tokens ([#356](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/356)) ([f9c3449](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/f9c344953b8161a4385cab3a3dcc8b6a7210446f))
## [0.20.1](https://github.com/RocketChat/Rocket.Chat.Fuselage/compare/v0.20.0...v0.20.1) (2020-12-22)
**Note:** Version bump only for package @rocket.chat/emitter
......
{
"name": "@rocket.chat/emitter",
"version": "0.20.1",
"version": "0.21.0",
"description": "Event Emitter by Rocket.Chat",
"homepage": "https://rocketchat.github.io/Rocket.Chat.Fuselage/",
"author": {
......
......@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [0.21.0](https://github.com/RocketChat/Rocket.Chat.Fuselage/compare/v0.20.3...v0.21.0) (2021-01-31)
### Features
* Built modules for design tokens ([#356](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/356)) ([f9c3449](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/f9c344953b8161a4385cab3a3dcc8b6a7210446f))
## [0.20.1](https://github.com/RocketChat/Rocket.Chat.Fuselage/compare/v0.20.0...v0.20.1) (2020-12-22)
**Note:** Version bump only for package @rocket.chat/fuselage-hooks
......
{
"name": "@rocket.chat/fuselage-hooks",
"version": "0.20.1",
"version": "0.21.0",
"description": "React hooks for Fuselage, Rocket.Chat's design system and UI toolkit",
"homepage": "https://rocketchat.github.io/Rocket.Chat.Fuselage/",
"author": {
......@@ -82,7 +82,7 @@
"access": "public"
},
"dependencies": {
"@rocket.chat/fuselage-tokens": "^0.20.1",
"@rocket.chat/fuselage-tokens": "^0.21.0",
"use-subscription": "^1.4.1"
}
}
......@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [0.21.0](https://github.com/RocketChat/Rocket.Chat.Fuselage/compare/v0.20.3...v0.21.0) (2021-01-31)
### Features
* Built modules for design tokens ([#356](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/356)) ([f9c3449](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/f9c344953b8161a4385cab3a3dcc8b6a7210446f))
## [0.20.1](https://github.com/RocketChat/Rocket.Chat.Fuselage/compare/v0.20.0...v0.20.1) (2020-12-22)
**Note:** Version bump only for package @rocket.chat/fuselage-polyfills
......
{
"name": "@rocket.chat/fuselage-polyfills",
"version": "0.20.1",
"version": "0.21.0",
"description": "A bundle of useful poly/ponyfills used by fuselage",
"author": {
"name": "Rocket.Chat",
......
......@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [0.21.0](https://github.com/RocketChat/Rocket.Chat.Fuselage/compare/v0.20.3...v0.21.0) (2021-01-31)
### Features
* Built modules for design tokens ([#356](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/356)) ([f9c3449](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/f9c344953b8161a4385cab3a3dcc8b6a7210446f))
## [0.20.1](https://github.com/RocketChat/Rocket.Chat.Fuselage/compare/v0.20.0...v0.20.1) (2020-12-22)
**Note:** Version bump only for package @rocket.chat/fuselage-tokens
......
{
"name": "@rocket.chat/fuselage-tokens",
"version": "0.20.1",
"version": "0.21.0",
"description": "Design tokens for Fuselage, Rocket.Chat's design system",
"homepage": "https://rocketchat.github.io/Rocket.Chat.Fuselage/",
"author": {
......
......@@ -3,6 +3,32 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [0.21.0](https://github.com/RocketChat/Rocket.Chat.Fuselage/compare/v0.20.3...v0.21.0) (2021-01-31)
### Bug Fixes
* Banner surface adjustments ([#362](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/362)) ([2d59b7c](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/2d59b7c41962f24aa13face91a9b9f0ea8f1718a))
* Pass appId and blockId from blocks to elements ([#366](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/366)) ([8a1b552](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/8a1b552f8dbc3a9b321d888f4a7e9dc9af2922cf))
### Features
* Built modules for design tokens ([#356](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/356)) ([f9c3449](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/f9c344953b8161a4385cab3a3dcc8b6a7210446f))
* linear_scale element ([#365](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/365)) ([43a4c54](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/43a4c54ed10d096ef2259ddcd30c3bbd97ae866a))
## [0.20.3](https://github.com/RocketChat/Rocket.Chat.Fuselage/compare/v0.20.2...v0.20.3) (2021-01-29)
**Note:** Version bump only for package @rocket.chat/fuselage-ui-kit
## [0.20.2](https://github.com/RocketChat/Rocket.Chat.Fuselage/compare/v0.20.1...v0.20.2) (2021-01-27)
**Note:** Version bump only for package @rocket.chat/fuselage-ui-kit
......
{
"name": "@rocket.chat/fuselage-ui-kit",
"version": "0.20.2",
"version": "0.21.0",
"description": "UiKit elements for Rocket.Chat Apps built under Fuselage design system",
"homepage": "https://rocketchat.github.io/Rocket.Chat.Fuselage/",
"author": {
......@@ -57,10 +57,10 @@
"@babel/preset-react": "^7.10.4",
"@rocket.chat/apps-engine": "^1.17.0",
"@rocket.chat/eslint-config": "^0.4.0",
"@rocket.chat/fuselage": "^0.20.2",
"@rocket.chat/fuselage-hooks": "^0.20.1",
"@rocket.chat/icons": "^0.20.1",
"@rocket.chat/ui-kit": "^0.20.1",
"@rocket.chat/fuselage": "^0.21.0",
"@rocket.chat/fuselage-hooks": "^0.21.0",
"@rocket.chat/icons": "^0.21.0",
"@rocket.chat/ui-kit": "^0.21.0",
"@storybook/addon-essentials": "^6.1.11",
"@storybook/addons": "^6.1.11",
"@storybook/react": "^6.1.11",
......@@ -87,6 +87,6 @@
},
"gitHead": "f8467b8ffb6f90d91b46fbcdd5dca169235916a4",
"dependencies": {
"@rocket.chat/fuselage-polyfills": "^0.20.1"
"@rocket.chat/fuselage-polyfills": "^0.21.0"
}
}
import { Box, Button, ButtonGroup, Throbber } from '@rocket.chat/fuselage';
import { Box, Button, ButtonGroup } from '@rocket.chat/fuselage';
import React, { memo, useMemo } from 'react';
import { useUiKitState } from '../hooks';
......@@ -33,7 +33,7 @@ const LinearScaleElement = ({ className, element, context, parser }) => {
alignItems='center'
>
{preLabel && (
<Box fontScale='c2' paddingInlineEnd={2} textAlign='start'>
<Box fontScale='c2' paddingInlineEnd={8} textAlign='start'>
{parser.plainText(preLabel)}
</Box>
)}
......@@ -57,20 +57,16 @@ const LinearScaleElement = ({ className, element, context, parser }) => {
flexShrink={1}
onClick={action}
>
{loading ? (
<Throbber />
) : (
parser.plainText({
type: 'plain_text',
text: String(i + minValue),
})
)}
{parser.plainText({
type: 'plain_text',
text: String(i + minValue),
})}
</Button>
))}
</ButtonGroup>
</Box>
{postLabel && (
<Box fontScale='c2' paddingInlineStart={2} textAlign='end'>
<Box fontScale='c2' paddingInlineStart={8} textAlign='end'>
{parser.plainText(postLabel)}
</Box>
)}
......
import { useMutableCallback } from '@rocket.chat/fuselage-hooks';
import { useSafely, useMutableCallback } from '@rocket.chat/fuselage-hooks';
import { BlockContext } from '@rocket.chat/ui-kit';
import { createContext, useContext, useMemo, useState } from 'react';
......@@ -25,8 +25,8 @@ export const useUiKitState = (
} = useContext(kitContext);
const { value: _value = initialOption?.value ?? initialValue } =
values[actionId] || {};
const [value, setValue] = useState(_value);
const [loading, setLoading] = useState(false);
const [value, setValue] = useSafely(useState(_value));
const [loading, setLoading] = useSafely(useState(false));
const error = errors && actionId && errors[actionId];
......
......@@ -3,6 +3,39 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [0.21.0](https://github.com/RocketChat/Rocket.Chat.Fuselage/compare/v0.20.3...v0.21.0) (2021-01-31)
### Bug Fixes
* AvatarProps declaration ([#361](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/361)) ([6324875](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/6324875c68e0b7b11536e3b766c27eb8e301fe52))
* Change option styles ([#358](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/358)) ([c479d70](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/c479d7041710e04fe8a9d8e766720ec206464e89))
* Pass appId and blockId from blocks to elements ([#366](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/366)) ([8a1b552](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/8a1b552f8dbc3a9b321d888f4a7e9dc9af2922cf))
* sidebar-item__menu-wraper opacity on IE ([#381](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/381)) ([3038b15](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/3038b15002d6df3d184a2dac2a97f5a3d0aa50f4))
* Temporary fix for auto complete ([#364](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/364)) ([218a8b3](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/218a8b30c42c7a2321f2de3d0cc081131e890834))
* Update Fuselage typings ([#355](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/355)) ([85f9fa1](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/85f9fa13f818703bce1100ad706a66d703c0b0ba))
### Features
* Built modules for design tokens ([#356](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/356)) ([f9c3449](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/f9c344953b8161a4385cab3a3dcc8b6a7210446f))
* linear_scale element ([#365](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/365)) ([43a4c54](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/43a4c54ed10d096ef2259ddcd30c3bbd97ae866a))
## [0.20.3](https://github.com/RocketChat/Rocket.Chat.Fuselage/compare/v0.20.2...v0.20.3) (2021-01-29)
### Bug Fixes
* sidebar-item__menu-wraper opacity on IE ([#381](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues/381)) ([e818b5c](https://github.com/RocketChat/Rocket.Chat.Fuselage/commit/e818b5cd99b1749997d6f487517c29722c77a23a))
## [0.20.2](https://github.com/RocketChat/Rocket.Chat.Fuselage/compare/v0.20.1...v0.20.2) (2021-01-27)
**Note:** Version bump only for package @rocket.chat/fuselage
......
{
"name": "@rocket.chat/fuselage",
"version": "0.20.2",
"version": "0.21.0",
"author": {
"name": "Rocket.Chat",
"url": "https://rocket.chat/"
......@@ -50,8 +50,8 @@
"react-dom": "^16.13.1"
},
"dependencies": {
"@rocket.chat/css-in-js": "^0.20.2",
"@rocket.chat/fuselage-tokens": "^0.20.1",
"@rocket.chat/css-in-js": "^0.21.0",
"@rocket.chat/fuselage-tokens": "^0.21.0",
"invariant": "^2.2.4",
"react-keyed-flatten-children": "^1.2.0"
},
......@@ -63,8 +63,8 @@
"@babel/preset-env": "^7.11.5",
"@babel/preset-react": "^7.10.4",
"@rocket.chat/eslint-config": "^0.4.0",
"@rocket.chat/fuselage-hooks": "^0.20.1",
"@rocket.chat/fuselage-polyfills": "^0.20.1",
"@rocket.chat/fuselage-hooks": "^0.21.0",
"@rocket.chat/fuselage-polyfills": "^0.21.0",
"@storybook/addon-essentials": "^6.1.11",
"@storybook/addon-jest": "^6.1.11",
"@storybook/addon-links": "^6.1.11",
......
......@@ -3,7 +3,6 @@ import React, { useCallback, useMemo } from 'react';
import { composeClassNames as cx } from '../../helpers/composeClassNames';
import { useStyleSheet } from '../../hooks/useStyleSheet';
import { Box, Scrollable } from '../Box';
import Button from '../Button';
import { Icon } from '../Icon';
import styleSheet from './Banner.styles.scss';
......@@ -69,16 +68,12 @@ const Banner = ({
{icon && isIconVisible && (
<div className={cx('rcx-banner__icon')({ inline })}>{icon}</div>
)}
<Scrollable horizontal>
<Box className={cx('rcx-banner__wrapper')()}>
<div className={cx('rcx-banner__content')({ inline })}>
{title && (
<h6 className={cx('rcx-banner__title')({ inline })}>{title}</h6>
)}
{children}
</div>
</Box>
</Scrollable>
<div className={cx('rcx-banner__content')({ inline })}>
{title && (
<h6 className={cx('rcx-banner__title')({ inline })}>{title}</h6>
)}
{children}
</div>
{closeable && (
<div className={cx('rcx-banner__close-button')({ inline })}>
<Button
......
......@@ -86,12 +86,6 @@
}
}
&__wrapper {
display: flex;
flex-grow: 1;
align-self: center;
}
&__content {
flex-grow: 1;
align-self: center;
......
......@@ -185,8 +185,9 @@ $sidebar-item-color-selected: theme(