Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V6 #1109

Merged
merged 70 commits into from
Feb 6, 2024
Merged

V6 #1109

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
7f70693
feat(Button)!: add CSS API (#1066)
amje Nov 3, 2023
193d856
feat!: remove focus visible fallback (#1086)
Raubzeug Nov 7, 2023
ecdd1aa
feat!: remove old theme variables fallback (#1092)
amje Nov 7, 2023
f10d616
feat!: add css imports to cjs files (#1101)
amje Nov 8, 2023
3cff663
chore: remove old files (#1100)
amje Nov 8, 2023
bf6f77d
feat!: rename theme prop `positive` -> `success` (#1093)
amje Nov 8, 2023
82f8afa
refactor(Link)!: Remove normal-visitable view (#905)
helenjer Nov 8, 2023
a28abcf
feat!: support RTL direction (#1111)
amje Nov 13, 2023
b6d4200
feat(Button)!: use logical properties (#1119)
amje Nov 14, 2023
47f7b84
feat: support RTL in components (#1125)
amje Nov 15, 2023
3cdca3d
feat(Switch): support RTL (#1120)
amje Nov 15, 2023
74899ff
refactor: components ClipboardButton and ClipboardIcon (#1123)
Raubzeug Nov 16, 2023
815f5a8
feat(Sheet): support RTL (#1138)
Mishnya Nov 17, 2023
1250ba2
feat!: add CSS API instead of `--yc-*` variables (#1127)
amje Nov 18, 2023
6dcbdae
fix(Toaster): use logical css values in stories (#1142)
Raubzeug Nov 20, 2023
345ce4d
feat(Disclosure): use logical properties (#1140)
Raubzeug Nov 20, 2023
a82ad0a
feat(Text): rtl support (#1143)
Raubzeug Nov 20, 2023
a08f03c
feat(Table): use uikit icons (#1151)
Raubzeug Nov 22, 2023
e7f58a6
docs(Tabs): use start, end (#1148)
Raubzeug Nov 23, 2023
dd554bb
feat(List): support RTL (#1145)
Mishnya Nov 23, 2023
5a44a5f
feat: updated TextInput "type" property to allow using only well-know…
DenisVershkov Nov 24, 2023
52b2794
feat(Table): support rtl (#1152)
Raubzeug Nov 27, 2023
bdf4d5b
feat(Skeleton): support RTL (#1136)
Mishnya Nov 28, 2023
caaf06b
feat(Progress): support rtl (#1141)
eyoue Nov 30, 2023
a5bf8eb
feat(Alert): support RTL (#1167)
Mishnya Dec 1, 2023
39b4694
fix: rebase issues
amje Dec 6, 2023
bc63378
feat(Text): support multiline and fixed width ellipsis (#1122)
IsaevAlexandr Dec 11, 2023
cedc20b
feat: add new layout component `Box` (#1121)
IsaevAlexandr Dec 14, 2023
cdabe24
feat(Toaster)!: use theme prop instead of type (#1198)
amje Dec 18, 2023
343b94c
feat(TextInput): support rtl (#1207)
ValeraS Dec 19, 2023
0c67d85
feat(Progress): support customization (#1193)
Lunory Dec 20, 2023
c2719ae
feat!: merge old Tooltip with ActionTooltip and introduce new Tooltip…
DenisVershkov Dec 22, 2023
92fe12f
feat(Table)!: remove uppercase heading style (#1222)
ArturAbdullin Dec 25, 2023
fbf41d3
feat!: update avatar and user components (#1221)
DakEnviy Dec 27, 2023
fb62985
fix(Button): fix disabled raised view style (#1226)
amje Dec 27, 2023
2c16005
feat!: delete deprecated hooks (#1213)
NikitaCG Jan 12, 2024
2229f37
feat(Box): fix some unnecessary typings (#1252)
IsaevAlexandr Jan 18, 2024
2b223d5
feat(Dialog): add prop contentOverflow to control overflow behaviour …
DenisVershkov Jan 18, 2024
150204d
feat: added CSS custom properties for RTL (#1227)
atroynikov Jan 19, 2024
aaf9b0f
fix(ThemeProvider): inner provider should overwrite specified props a…
ValeraS Jan 19, 2024
6749bb8
feat(Table)!: update SortIndicator view (#1220)
amje Jan 19, 2024
cda8eb6
refactor(Progress): replaced class components by functional component…
atroynikov Jan 19, 2024
69efabe
refactor!: remove remaining `--yc-*` variables (#1256)
amje Jan 22, 2024
07c9f4f
feat!: remove setters from mobile hooks (#1262)
amje Jan 22, 2024
07a2009
feat(TreeSelect): added TreeSelect unstable component and new list ho…
IsaevAlexandr Jan 22, 2024
9c23dae
fix: TreeSelect component after useMobile refactoring (#1265)
IsaevAlexandr Jan 22, 2024
465bcb2
refactor(CopyToClipboard): replaced class component by functional com…
atroynikov Jan 23, 2024
133c6a3
chore: add deprecation warnings about using physical values (#1277)
amje Jan 26, 2024
9493062
feat: add useControlledState hook (#1276)
ValeraS Jan 26, 2024
4f3be2d
feat(Table)!: update cell paddings (#1271)
amje Jan 29, 2024
c879bba
refactor!: rename .yc class prefix (#1260)
amje Jan 29, 2024
a31d7a1
refactor(Breadcrumbs)!: use gap property for gaps between breadcrumbs…
isqua Jan 29, 2024
3bedd2a
chore: update deps (#1282)
amje Jan 29, 2024
75c3fd5
feat: added css api for TextInput TextArea and Select components (#1269)
sunduckcow Jan 29, 2024
9882c53
fix: fix controls css api (#1289)
amje Jan 30, 2024
347c64d
feat(Link)!: the "href" property is required (#1270)
LakeVostok Jan 31, 2024
ef6762a
feat(Persona)!: refactored and renamed to UserLabel (#1292)
DakEnviy Jan 31, 2024
00531ad
feat!: rename onClose to onCloseClick (#1295)
amje Feb 1, 2024
b272b72
fix: rebase fixes
amje Feb 1, 2024
1042ac3
fix: use ActionTooltip in components
amje Feb 1, 2024
99e454f
fix: fix unit tests
amje Feb 1, 2024
4baeef9
fix: fix visual tests
amje Feb 1, 2024
94ed9f7
6.0.0-beta.0
amje Feb 1, 2024
3f3a805
fix(DropdownMenu): fix rtl behaviour
amje Feb 1, 2024
62405d5
fix(Popover): fix rtl placement
amje Feb 1, 2024
5f123e9
fix: rework new ListItemView text crop behaviour (#1301)
IsaevAlexandr Feb 2, 2024
e0471d6
fix(TreeSelect): removed select indentation from group items (#1303)
IsaevAlexandr Feb 2, 2024
981bb87
6.0.0-beta.1
amje Feb 2, 2024
4f9d2ec
fix: rebase issues
amje Feb 6, 2024
5135d48
chore: add linter rule about testing-library import
amje Feb 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 14 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
"@gravity-ui/eslint-config",
"@gravity-ui/eslint-config/client",
"@gravity-ui/eslint-config/prettier",
"@gravity-ui/eslint-config/import-order",
"@gravity-ui/eslint-config/a11y"
],
"root": true,
"rules": {
"react/jsx-fragments": ["error", "element"],
"react/jsx-fragments": [
"error",
"element"
],
"no-restricted-syntax": [
"error",
{
Expand All @@ -17,9 +21,16 @@
{
"selector": "TSTypeReference>TSQualifiedName[left.name='React'][right.name='FC']",
"message": "Don't use React.FC"
},
{
"selector": "ImportDeclaration[source.value='@testing-library/react']",
"message": "Please use wrapper from 'test-utils/utils.tsx'."
}
],
"jsx-a11y/no-autofocus": 0
"jsx-a11y/no-autofocus": "off",
"import/no-extraneous-dependencies": "off",
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
"@typescript-eslint/consistent-type-imports": ["error", {"prefer": "type-imports", "fixStyle": "separate-type-imports"}]
},
"overrides": [
{
Expand All @@ -30,7 +41,7 @@
},
"extends": ["plugin:testing-library/react"],
"rules": {
"jsx-a11y/no-static-element-interactions": 0
"jsx-a11y/no-static-element-interactions": "off"
},
"excludedFiles": "**/__tests__/**/*.visual.test.*"
},
Expand Down
3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx commitlint -e
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx nano-staged
3 changes: 2 additions & 1 deletion .storybook/decorators/withLang.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import React from 'react';

import type {Decorator} from '@storybook/react';

import {Lang, configure} from '../../src';
import {configure} from '../../src';
import type {Lang} from '../../src';

export const WithLang: Decorator = (Story, context) => {
const lang = context.globals.lang;
Expand Down
16 changes: 7 additions & 9 deletions .storybook/decorators/withMobile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@ import React from 'react';

import type {Decorator} from '@storybook/react';

import {useMobile} from '../../src';
import {MobileProvider} from '../../src';

export const WithMobile: Decorator = (Story, context) => {
const mobileValue = context.globals.platform === 'mobile';
const platform = context.globals.platform;

const [, setMobile] = useMobile(); // eslint-disable-line react-hooks/rules-of-hooks

React.useEffect(() => {
setMobile(mobileValue);
}, [mobileValue]);

return <Story {...context} />;
return (
<MobileProvider mobile={platform === 'mobile'} platform={platform}>
<Story key={platform} {...context} />
</MobileProvider>
);
};
13 changes: 13 additions & 0 deletions .storybook/decorators/withStrictMode.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react';

import type {Decorator} from '@storybook/react';

export const WithStrictMode: Decorator = (Story, context) => {
const children = <Story {...context} />;

if (context.parameters?.disableStrictMode) {
return children;
}

return <React.StrictMode>{children}</React.StrictMode>;
};
13 changes: 13 additions & 0 deletions .storybook/decorators/withTheme.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react';

import type {Decorator} from '@storybook/react';

import {ThemeProvider} from '../../src';

export const WithTheme: Decorator = (Story, context) => {
return (
<ThemeProvider theme={context.globals.theme} direction={context.globals.direction}>
<Story {...context} />
</ThemeProvider>
);
};
54 changes: 21 additions & 33 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,19 @@ import '../styles/fonts.scss';
// eslint-disable-next-line import/order
import '../styles/styles.scss';

import React from 'react';

import {MINIMAL_VIEWPORTS} from '@storybook/addon-viewport';
import type {Decorator, Preview} from '@storybook/react';
import type {Preview} from '@storybook/react';

import {Lang, MobileProvider, ThemeProvider, configure} from '../src';
import {DocsDecorator} from '../src/demo/DocsDecorator/DocsDecorator';

import {WithLang} from './decorators/withLang';
import {WithMobile} from './decorators/withMobile';
import {WithStrictMode} from './decorators/withStrictMode';
import {WithTheme} from './decorators/withTheme';
import {themes} from './theme';

configure({
lang: Lang.En,
});

const withContextProvider: Decorator = (Story, context) => {
if (context.parameters?.disableStrictMode) {
return (
<ThemeProvider theme={context.globals.theme}>
<MobileProvider>
<Story {...context} />
</MobileProvider>
</ThemeProvider>
);
}

return (
<React.StrictMode>
<ThemeProvider theme={context.globals.theme}>
<MobileProvider>
<Story {...context} />
</MobileProvider>
</ThemeProvider>
</React.StrictMode>
);
};

const preview: Preview = {
decorators: [WithMobile, WithLang, withContextProvider],
decorators: [WithLang, WithMobile, WithTheme, WithStrictMode],
parameters: {
docs: {
theme: themes.light,
Expand Down Expand Up @@ -79,9 +52,10 @@ const preview: Preview = {
items: [
{value: 'light', right: '☼', title: 'Light'},
{value: 'dark', right: '☾', title: 'Dark'},
{value: 'light-hc', right: '☼', title: 'High Contrast Light (beta)'},
{value: 'dark-hc', right: '☾', title: 'High Contrast Dark (beta)'},
{value: 'light-hc', right: '☼', title: 'Light (high contrast)'},
{value: 'dark-hc', right: '☾', title: 'Dark (high contrast)'},
],
dynamicTitle: true,
},
},
lang: {
Expand All @@ -93,6 +67,19 @@ const preview: Preview = {
{value: 'en', right: '🇬🇧', title: 'En'},
{value: 'ru', right: '🇷🇺', title: 'Ru'},
],
dynamicTitle: true,
},
},
direction: {
defaultValue: 'ltr',
toolbar: {
title: 'Direction',
icon: 'menu',
items: [
{value: 'ltr', title: 'Left to Right', icon: 'arrowrightalt'},
{value: 'rtl', title: 'Right to Left', icon: 'arrowleftalt'},
],
dynamicTitle: true,
},
},
platform: {
Expand All @@ -103,6 +90,7 @@ const preview: Preview = {
{value: 'desktop', title: 'Desktop', icon: 'browser'},
{value: 'mobile', title: 'Mobile', icon: 'mobile'},
],
dynamicTitle: true,
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion .storybook/theme-addon/register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import {getThemeType} from '../../src/components/theme/getThemeType';
import {themes} from '../theme';

const ADDON_ID = 'yc-theme-addon';
const ADDON_ID = 'g-theme-addon';
const TOOL_ID = `${ADDON_ID}tool`;

addons.register(ADDON_ID, (api) => {
Expand All @@ -24,6 +24,6 @@
const [{theme}] = useGlobals();
React.useEffect(() => {
api.setOptions({theme: themes[getThemeType(theme)]});
}, [theme]);

Check warning on line 27 in .storybook/theme-addon/register.tsx

View workflow job for this annotation

GitHub Actions / Verify Files

React Hook React.useEffect has a missing dependency: 'api'. Either include it or remove the dependency array

Check warning on line 27 in .storybook/theme-addon/register.tsx

View workflow job for this annotation

GitHub Actions / Verify Files

React Hook React.useEffect has a missing dependency: 'api'. Either include it or remove the dependency array

Check warning on line 27 in .storybook/theme-addon/register.tsx

View workflow job for this annotation

GitHub Actions / Verify Files

React Hook React.useEffect has a missing dependency: 'api'. Either include it or remove the dependency array
return null;
}
2 changes: 2 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"extends": ["@gravity-ui/stylelint-config", "@gravity-ui/stylelint-config/prettier"],
"plugins": ["stylelint-use-logical"],
"rules": {
"csstools/use-logical": ["always", {"except": ["float", "width", "min-width", "max-width", "height", "min-height", "max-height"]}],
"declaration-colon-space-after": "always-single-line"
}
}
104 changes: 0 additions & 104 deletions CHANGELOG_V2.md

This file was deleted.

12 changes: 6 additions & 6 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
/src/components/ActionTooltip @amje
/src/components/Alert @IsaevAlexandr
/src/components/ArrowToggle @Marginy605
/src/components/Avatar @DakEnviy
#/src/components/Breadcrumbs
/src/components/Button @amje
/src/components/Card @Lunory
/src/components/Checkbox @zamkovskaya
/src/components/ClipboardButton @SeqviriouM
/src/components/ClipboardIcon @SeqviriouM
/src/components/ClipboardButton @Raubzeug
/src/components/ClipboardIcon @Raubzeug
/src/components/ControlLabel @korvin89
/src/components/CopyToClipboard @SeqviriouM
#/src/components/Dialog
Expand All @@ -22,23 +23,22 @@
/src/components/Menu @NikitaCG
/src/components/Modal @amje
/src/components/Pagination @jhoncool
/src/components/Persona @DaffPunks
/src/components/Popover @kseniya57
/src/components/Popup @amje
/src/components/Portal @amje
/src/components/Progress @Lunory
/src/components/Radio @zamkovskaya
/src/components/RadioButton @zamkovskaya
/src/components/RadioGroup @zamkovskaya
/src/components/User @DaffPunks
/src/components/UserAvatar @DaffPunks
/src/components/User @DakEnviy
/src/components/UserLabel @DakEnviy
/src/components/Select @korvin89
/src/components/Sheet @mournfulCoroner
/src/components/Skeleton @SeqviriouM
/src/components/Spin @SeqviriouM
/src/components/Stories @DarkGenius
/src/components/Switch @zamkovskaya
#/src/components/Table
/src/components/Table @Raubzeug
/src/components/Tabs @sofiushko
/src/components/Text @IsaevAlexandr
/src/components/controls/TextArea @korvin89
Expand Down
Loading
Loading