@css-hooks/preact 0.6.0 → 0.7.0

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.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +66 -0
  3. package/package.json +2 -2
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Nick Saunders
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,66 @@
1
+ <p align="center">
2
+ <a href="https://css-hooks.com/#gh-dark-mode-only" target="_blank">
3
+ <img alt="CSS Hooks" src="https://raw.githubusercontent.com/css-hooks/css-hooks/HEAD/.github/logo-dark.svg" width="310" height="64" style="max-width: 100%;">
4
+ </a>
5
+ <a href="https://css-hooks.com/#gh-light-mode-only" target="_blank">
6
+ <img alt="CSS Hooks" src="https://raw.githubusercontent.com/css-hooks/css-hooks/HEAD/.github/logo-light.svg" width="310" height="64" style="max-width: 100%;">
7
+ </a>
8
+ </p>
9
+
10
+ <p align="center">
11
+ <a href="https://github.com/css-hooks/css-hooks/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/css-hooks/css-hooks/ci.yml?branch=master" alt="Build Status"></a>
12
+ <a href="https://github.com/css-hooks/css-hooks/releases"><img src="https://img.shields.io/npm/v/hooks.css.svg" alt="Latest Release"></a>
13
+ <a href="https://github.com/css-hooks/css-hooks/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/css-hooks.svg" alt="License"></a>
14
+ </p>
15
+
16
+ ---
17
+
18
+ ## Overview
19
+
20
+ Hooks bring CSS features to native inline styles, enabling you to target various
21
+ states such as hover, focus, and active, all without leaving the `style` prop.
22
+ For example, hooks can easily solve the common use case of applying state-driven
23
+ styles to a link:
24
+
25
+ ```jsx
26
+ <a
27
+ href="https://css-hooks.com/"
28
+ style={hooks({
29
+ color: "#03f",
30
+ hover: {
31
+ color: "#09f",
32
+ },
33
+ active: {
34
+ color: "#e33",
35
+ },
36
+ })}
37
+ >
38
+ Hooks
39
+ </a>
40
+ ```
41
+
42
+ Notably, the `hooks` function is pure. It simply returns a flat style object
43
+ that is compatible with the `style` prop, creating dynamic property values that
44
+ change under various conditions through CSS variables.
45
+
46
+ ## Documentation
47
+
48
+ Please visit [css-hooks.com](https://css-hooks.com) to get started.
49
+
50
+ ## Packages
51
+
52
+ - [hooks.css](packages/hooks.css): The style sheet that enables CSS Hooks
53
+ - [@css-hooks/react](packages/react): React framework integration
54
+ - [@css-hooks/solid](packages/solid): Solid framework integration
55
+ - [@css-hooks/preact](packages/preact): Preact framework integration
56
+ - [@css-hooks/core](packages/core): Core CSS Hooks package (internal use only)
57
+
58
+ ## Contributing
59
+
60
+ Contributions are welcome. Please see the
61
+ [contributing guidelines](CONTRIBUTING.md) for more information.
62
+
63
+ ## License
64
+
65
+ CSS Hooks is offered under the [MIT license](LICENSE) by
66
+ [Nick Saunders](https://github.com/nsaunders).
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@css-hooks/preact",
3
3
  "description": "CSS Hooks for Preact",
4
- "version": "0.6.0",
4
+ "version": "0.7.0",
5
5
  "author": "Nick Saunders",
6
6
  "dependencies": {
7
- "@css-hooks/core": "^0.6.0"
7
+ "@css-hooks/core": "^0.7.0"
8
8
  },
9
9
  "devDependencies": {
10
10
  "@tsconfig/node-lts": "^18.12.3",