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

v5.0.0: удаление styled-components #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v5.0.0
- [-] анимации и миксины на styled-components
- [-] зависимость styled-components

# v4.0.0
- [+] новые миксины: `mvk`, `odr`, `scaleWidthHeight`, `aspectRatio`, `fixSafariRadiusOverflow`, `customScrollbar`, `ifFlexGapNotSupported`, `flexGap`
- [+] новые функции: `px-to-rem`, `round`, `fluid`, `safe-top-value`, `safe-bottom-value`
Expand Down
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,9 @@ console.log(markup.currentHtmlFontSize);

### Миксины и анимации

* [mixins.ts](./src/mixins.ts) — миксины для styled-components
* [animations.ts](./src/animations.ts) — анимации для styled-components
* [mixins.scss](./src/mixins.scss) — миксины для Sass
* [animations.scss](./src/animations.scss) — анимации для Sass

Чтобы использовать миксин или анимацию в проекте с styled-components, импортируйте нужный объект из библиотеки:

```typescript
import { mixins } from '@ktsstudio/mediaproject-style';

...

${mixins.centerPos()};
```

Чтобы использовать миксин или анимацию в проекте с Sass, импортируйте файл с ними:

```scss
Expand Down
10 changes: 2 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ktsstudio/mediaproject-style",
"version": "4.0.0",
"version": "5.0.0",
"description": "Package with common styles for media projects",
"author": "KTS Studio <[email protected]> (https://kts.studio)",
"repository": {
Expand Down Expand Up @@ -48,7 +48,6 @@
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-terser": "^0.4.0",
"@rollup/plugin-typescript": "^11.0.0",
"@types/styled-components": "^5.1.26",
"@typescript-eslint/eslint-plugin": "^4.13.0",
"@typescript-eslint/parser": "^4.14.1",
"cpx": "^1.5.0",
Expand All @@ -64,12 +63,7 @@
"rimraf": "^4.4.0",
"rollup": "^3.12.0",
"rollup-plugin-peer-deps-external": "^2.2.4",
"styled-components": "^5.3.3",
"typescript": "^4.1.3"
},
"private": false,
"peerDependencies": {
"@types/styled-components": "^5.1.26",
"styled-components": "^5.3.3"
}
"private": false
}
56 changes: 0 additions & 56 deletions src/animations.ts

This file was deleted.

65 changes: 1 addition & 64 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,69 +1,6 @@
import { fadeAnimation, appearAnimation } from './animations';
import { markup, initMarkup, Markup } from './markup';
import {
mobile,
desktop,
ios,
android,
minHeight,
maxHeight,
portraitOrientation,
landscapeOrientation,
longScreen,
hover,
autoHover,
animate,
square,
centerPos,
backgroundImageCover,
backgroundImageContain,
absoluteBackgroundPosition,
fixedBackgroundPosition,
autoCropText,
hideScrollbar,
inputStyles,
placeholderStyles,
sidePadding,
contentWidth,
adaptiveSidePadding,
adaptiveContentWidth,
} from './mixins';
import { WindowSize, MarkupConfig } from './types/markup';

const mixins = {
mobile,
desktop,
ios,
android,
minHeight,
maxHeight,
portraitOrientation,
landscapeOrientation,
longScreen,
hover,
autoHover,
animate,
square,
centerPos,
backgroundImageCover,
backgroundImageContain,
absoluteBackgroundPosition,
fixedBackgroundPosition,
autoCropText,
hideScrollbar,
inputStyles,
placeholderStyles,
sidePadding,
contentWidth,
adaptiveSidePadding,
adaptiveContentWidth,
};

const animations = {
fadeAnimation,
appearAnimation,
};

export { markup, initMarkup, Markup, mixins, animations };
export { markup, initMarkup, Markup };

export { WindowSize, MarkupConfig };
Loading