-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
55 changed files
with
44,466 additions
and
20,843 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module.exports = { | ||
extends: ['@gravity-ui/eslint-config/prettier', './.eslintrc.js'], | ||
extends: ['./.eslintrc.js', '@gravity-ui/eslint-config/prettier'], | ||
root: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
## Breaking | ||
|
||
- Update to `@gravity-ui/uilit@5` | ||
- Remove peer dependency on `@doc-tools/transform` | ||
`@doc-tools/transform` js and css bundles should be attached directly to final projects | ||
- `DISLIKE_VARIANTS` not exported from package. Use `i18n['feedback-variants']` instead. | ||
|
||
|
||
### BookmarkButton | ||
- `bookmarkedPage` prop was changed to `isBookmarked`. (Same as `isLiked`, `isDislaked` in Feedback component) | ||
- `onChangeBookmarkPage` renamed to `onBookmark` | ||
|
||
### Contributors | ||
- Removed `lang` prop | ||
|
||
### Control | ||
- Replace `setRef` prop with `ref` (using forwardRef now) | ||
|
||
### Controls | ||
- Removed `lang` prop | ||
- Prop `showEditControl` replaced by `hideEditControl` | ||
|
||
### DividerControl | ||
- Removed `size`, `isVerticalView` props | ||
- Values for `size`, `isVerticalView` now stored in `ControlsLayoutContext` | ||
|
||
### FullScreenControl | ||
- Removed `lang` prop | ||
- Removed `size`, `isVerticalView`, `className`, `popupPosition` props | ||
- Values for `size`, `isVerticalView`, `popupPosition` now stored in `ControlsLayoutContext` | ||
- Value for `className` now stored in `ControlsLayoutContext.controlClassName` prop | ||
- Icon replaced with equal from `@gravity-ui/uikit` | ||
|
||
### LangControl | ||
- Prop `onChangeLang` is required now | ||
- Removed `size`, `isVerticalView`, `className`, `popupPosition` props | ||
- Values for `size`, `isVerticalView`, `popupPosition` now stored in `ControlsLayoutContext` | ||
- Value for `className` now stored in `ControlsLayoutContext.controlClassName` prop | ||
- Icon replaced with equal from `@gravity-ui/uikit` | ||
|
||
### PdfControl | ||
- Prop `pdfLink` is required now | ||
- Removed `lang` prop | ||
- Removed `size`, `isVerticalView`, `className`, `popupPosition` props | ||
- Values for `size`, `isVerticalView`, `popupPosition` now stored in `ControlsLayoutContext` | ||
- Value for `className` now stored in `ControlsLayoutContext.controlClassName` prop | ||
|
||
### SettingsControl | ||
- Removed `lang` prop | ||
- Removed `size`, `isVerticalView`, `className`, `popupPosition` props | ||
- Values for `size`, `isVerticalView`, `popupPosition` now stored in `ControlsLayoutContext` | ||
- Value for `className` now stored in `ControlsLayoutContext.controlClassName` prop | ||
|
||
### SinglePageControl | ||
- Prop `onChange` is required now | ||
- Removed `lang` prop | ||
- Removed `size`, `isVerticalView`, `className`, `popupPosition` props | ||
- Values for `size`, `isVerticalView`, `popupPosition` now stored in `ControlsLayoutContext` | ||
- Value for `className` now stored in `ControlsLayoutContext.controlClassName` prop | ||
|
||
### DocLayout | ||
- Removed `lang` prop | ||
- | ||
### DocLeadingPage | ||
- Removed `lang` prop | ||
|
||
### DocPageTitle | ||
- Ownership on bookmarks was removed. | ||
Bookmarks should be passed as children. | ||
- Removed `bookmarkedPage`, `onChangeBookmarkPage` props. | ||
|
||
### EditButton | ||
- Was removed in favor of EditControl | ||
|
||
### ErrorPage | ||
- Removed `lang` prop | ||
|
||
### Feedback | ||
- Removed `lang` prop | ||
- Removed `singlePage` prop | ||
- Removed `size`, `isVerticalView`, `className`, `popupPosition` props | ||
- Values for `size`, `isVerticalView`, `popupPosition` now stored in `ControlsLayoutContext` | ||
- Value for `className` now stored in `ControlsLayoutContext.controlClassName` prop | ||
- Pick `dislikeVariants` from i18n by default | ||
- Icons replaced with equal from `@gravity-ui/uikit` | ||
|
||
### MiniToc | ||
- Removed `lang` prop | ||
- MiniToc returns `null` on empty headings. (Previously it render useless title) | ||
|
||
### SearchBar | ||
- Removed `lang` prop | ||
- Icons replaced with equal from `@gravity-ui/uikit` | ||
|
||
### SearchItem | ||
- Removed `lang` prop | ||
|
||
### SearchPage | ||
- Removed `lang` prop | ||
|
||
### Subscribe | ||
- Prop `onSubscribe` is required now | ||
- Removed `lang` prop | ||
- Removed `size`, `isVerticalView`, `className`, `popupPosition` props | ||
- Values for `size`, `isVerticalView`, `popupPosition` now stored in `ControlsLayoutContext` | ||
- Value for `className` now stored in `ControlsLayoutContext.controlClassName` prop | ||
|
||
### Toc | ||
- Removed `lang` prop | ||
|
||
### TocNavPanel | ||
- Removed `lang` prop |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"sourceType": "unambiguous", | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"targets": { | ||
"chrome": 100, | ||
"safari": 15, | ||
"firefox": 91 | ||
} | ||
} | ||
], | ||
"@babel/preset-react", | ||
"@babel/preset-typescript" | ||
], | ||
"plugins": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.sb-show-main.sb-main-centered #storybook-root { | ||
padding: 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import {join, dirname} from 'path'; | ||
|
||
/** @type { import('@storybook/react-webpack5').StorybookConfig } */ | ||
const config = { | ||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], | ||
addons: [ | ||
'@storybook/addon-links', | ||
'@storybook/addon-essentials', | ||
{ | ||
name: '@storybook/addon-styling', | ||
options: { | ||
sass: { | ||
implementation: require("sass"), | ||
}, | ||
} | ||
}, | ||
'@storybook/addon-onboarding', | ||
'@storybook/addon-interactions', | ||
|
||
], | ||
framework: { | ||
name: '@storybook/react-webpack5', | ||
options: {}, | ||
}, | ||
docs: { | ||
autodocs: 'tag', | ||
}, | ||
async webpackFinal(config, { configType }) { | ||
config.resolve = config.resolve || {}; | ||
config.resolve.alias = { | ||
...(config.resolve.alias || {}), | ||
'react': dirname(require.resolve('react')), | ||
'react-dom': dirname(require.resolve('react-dom')), | ||
}; | ||
config.module.rules.push({ | ||
test: /\.svg$/, | ||
type: 'javascript/auto', | ||
use: ['@svgr/webpack'], | ||
}); | ||
|
||
return config; | ||
} | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** @type { import('@storybook/react').Preview } */ | ||
import { Preview } from '@storybook/react'; | ||
|
||
import './global.css'; | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
actions: {argTypesRegex: '^on[A-Z].*'}, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export default preview; |
Oops, something went wrong.