@spark-ui/tailwind-plugins 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.1.2](https://github.com/adevinta/spark/compare/@spark-ui/tailwind-plugins@1.1.1...@spark-ui/tailwind-plugins@1.1.2) (2023-03-13)
7
+
8
+ **Note:** Version bump only for package @spark-ui/tailwind-plugins
9
+
10
+ ## [1.1.1](https://github.com/adevinta/spark/compare/@spark-ui/tailwind-plugins@1.1.0...@spark-ui/tailwind-plugins@1.1.1) (2023-03-13)
11
+
12
+ **Note:** Version bump only for package @spark-ui/tailwind-plugins
13
+
6
14
  # 1.1.0 (2023-03-09)
7
15
 
8
16
  ### Features
@@ -0,0 +1,64 @@
1
+ import { Meta } from '@storybook/blocks'
2
+ import { StoryHeading } from '@docs/helpers/StoryHeading'
3
+ import { Alert } from '@docs/helpers/Alert'
4
+
5
+ <Meta title="utils/Tailwind plugins/animations" />
6
+
7
+ # Tailwind animation plugin
8
+
9
+ To use our Tailwind animation plugins, simply install the `@spark-ui/tailwind-plugins` package and add the animation plugin to your `tailwind.config.js` file
10
+
11
+ ```bash
12
+ $ npm i @spark-ui/tailwind-plugins
13
+ ```
14
+
15
+ ```js
16
+ // tailwind.config.js
17
+
18
+ const sparkPlugins = require('@spark-ui/tailwind-plugins')
19
+
20
+ module.exports = {
21
+ ...,
22
+ plugins: [sparkPlugins.animation()],
23
+ }
24
+
25
+ ```
26
+
27
+ This plugin provides the following **animation-related** declaration properties that are missing by default in **Tailwind**:
28
+
29
+ - **animation-fill-mode**: `sp-anime-fill-{value}` (where `value` can be `forwards`, `backwards`, or `none`)
30
+ - **animation-duration**: `sp-anime-duration-{value}` (where `value` can be any keys of `theme.transitionDuration` or an arbitrary value like `sp-anime-duration-[458ms]`)
31
+ - **animation-delay**: `sp-anime-delay-{value}` (where `value` can be any keys of `theme.transitionDuration` or an arbitrary value like `sp-anime-delay-[458ms]`)
32
+ - **animation-direction**: `sp-anime-direction-{value}` (where `value` can be `normal`, `reverse`, `alternate`, `alternate-reverse`, `revert`, or `revert-layer`)
33
+ - **animation-iteration-count**: `sp-anime-iteration-{value}` (where `value` can be `1`, `2`, `3`, `infinite`, or an arbitrary value like `sp-iteration-[12]`)
34
+ - **animation-play-running**: `sp-anime-play-{value}` (where `value` can be `running`, or `paused`)
35
+ - **animation-timing-function**: `sp-anime-easing-{value}` (where `value` can be, `linear`, `in`, `out`, `in-out`, `in-back`, `out-back`, `in-out-back` or an arbitrary value like `sp-anime-easing-[cubic-bezier(0.95,0.05,0.795,0.035)]`)
36
+
37
+ <StoryHeading label="@keyframes" as="h3" />
38
+
39
+ This plugin also includes four animation keyframes:
40
+
41
+ - **animate-slide-top**: `animate-slide-top`
42
+ - **animate-slide-right**: `animate-slide-right`
43
+ - **animate-slide-bottom**: `animate-slide-bottom`
44
+ - **animate-slide-left**: `animate-slide-left`
45
+
46
+ <StoryHeading label="plugin options" as="h3" />
47
+
48
+ You can customize the **CSS class prefix** using the `prefixVariant` option.
49
+
50
+ By default, the prefix will be `anime-sp` (e.g. `sp-anime-fill-forwards`), but you can change it like so:
51
+
52
+ ```js
53
+ // tailwind.config.js
54
+
55
+ const sparkPlugins = require('@spark-ui/tailwind-plugins')
56
+
57
+ module.exports = {
58
+ ...,
59
+ plugins: [sparkPlugins.animation({ prefixVariant: 'bar' })],
60
+ }
61
+
62
+ ```
63
+
64
+ This will change the prefix to `bar` (e.g. `bar-fill-forwards`).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spark-ui/tailwind-plugins",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Spark Tailwind plugins",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -14,5 +14,5 @@
14
14
  "url": "git@github.com:adevinta/spark.git",
15
15
  "directory": "packages/utils/tailwind-plugins"
16
16
  },
17
- "gitHead": "9056e9ef060be292f86767f065680fc259b15f31"
17
+ "gitHead": "a1686f8fd79eee57d1515c6926d84c8e7c7f90a2"
18
18
  }